Take Airtrain from terminal to Jamaica Station and then LIRR to either Bay Shore, Sayville or Patchogue and then take a local taxi from the station to the ferry. Which station to get off at whill depend on what location on Fire Island you are going. For example for Fire Island Pines which is towards the middle you will get off at Sayville (taxi to Sayville Ferry Service), west locations get off at Bay Shore (taxi to Fire Island Ferries) and further east get off at Patchogue (taxi to Davis Park Ferry). From Jamaica its about 1 hour to Bay shore and about 1-1/2 hours to Patchogue and some trains will require a transfer at Babylon.
Take Airtrain from terminal