I know this is a milkshake thread and not an urban planning thread, but you have to realize the subways were built before the airports. The city absolutely could've done more to make the airports more accessible, but that's another story.
Anyway, the airports are way out at the end of Queens, and this dessert shop is smack in the middle of Brooklyn. If you really want to make the trip, the best you could do is take the A from JFK to Nostrand Ave, switch to the C for one stop to Franklin Ave, take the shuttle over to Prospect Park, and get on the Q another couple of stops to Cortelyou Road (and your milkshake). From there, you can take your treat with you on the way up to Grand Central!