I agree that 6 hours is a long wait, although you will have plenty to keep you busy during that time. As you're flying from the UK, you'll need to clear customs and immigration, for one thing. And, while I've never taken the train from Jamaica, Queens into Manhattan, I have on too many occasions found it difficult to get a taxi back to the airport from Manhattan. And, I wouldn't want to worry about delays on the subway or LIRR.
My suggestion is to visit Manhattan when you have more time to enjoy it. At most, you will have two to three hours given your flight schedules and customs, immigration, security lines, and travel time to/from the airport. JFK can actually be an interesting place. (I've spent some time there.

)