There is (since 2023) a train that connects directly from Grand Central to JFK AirTrain.
Airtrain opened in 2003 [1]. It connected to the subway system and, through Jamaica, Penn Station. The novel bit in 2023 was also linking into Grand Central.
[1] https://en.wikipedia.org/wiki/AirTrain_JFK
Huh. Google Maps was not showing me that.
EDIT: Oh, wait, misread, I thought you meant a direct train from Grand Central to the airport.
Airtrain opened in 2003 [1]. It connected to the subway system and, through Jamaica, Penn Station. The novel bit in 2023 was also linking into Grand Central.
[1] https://en.wikipedia.org/wiki/AirTrain_JFK