Most convenient would be Uber/Lyft (EWR taxis suck). Just get in the car and it'll take you there with no transfers.
Safest would probably be the train (AirTrain from your terminal to the EWR Rail Station, NJTransit to New York Penn Station, LIRR to Jamaica, AirTrain to your terminal). As noted above, during busy traffic times this is also probably the fastest (and certainly the most predictable). During off peak times the car will probably be faster.
Cheapest is NJTransit Bus 62 from your EWR terminal to Newark Penn Station, PATH train (the 33rd St/Midtown line--you may have to change at Journal Square depending on the day/time) from Newark Penn to 9th St, Subway (downtown A train, make sure it's a Lefferts Blvd train and not a Rockaway train) from West 4th St (enter at 8th St and 6th Ave right near the PATH) to Lefferts Blvd, Q10 bus from Lefferts Blvd to JFK.
The TWA Hotel is fun but not cheap.