Actually you can see the details once you download the metro rail system.
Follow the AirTran signs. Before trip go online to JFK website and read about AirTran I think it cost $10.50 now.
U should checkout their official website about it or u can a app called moovit which is very helpful.
You need to take an airtrain from JFK to Jamaica and then take the Port Jefferson line of the LIRR train to Port Jefferson
Thanks! Your answer is awaiting moderation.