D train to Seventh Avenue station in Manhattan; then, Queens-bound E train on the lower level to Sutphin/Archer/JFK station. AirTrain from there to your terminal. There is normal AirTrain service until 9:00 PM nightly.
Caution: on weekday afternoons, some E trains run along the F line in Queens. Make sure you board an E train whose destination sign reads "Jamaica Center," or "Parsons/Archer."
D train to Seventh Avenue