Easiest and most direct but expensive is by taxi. Shuttle services do not operate at that hour. You can also do it by train; Newark Airport AirTrain from terminal to Airport Station, NJ Transit train to NY-Penn Station, LIRR train to Jamaica, JFK AirTrain from Jamaica to terminals. All operate 24/7.
Easiest and most direct but