I am travelling on a scheduled flight from London arranged by the cruise company who will be providing a shuttle bus directly to the ship.
The ESTA is the same regardless of your travel purpose. This is different from most transit visas which are easier to get than a visitor visa, but have much stronger constraints. So there isn't a very precise definition of “transit” in the context of an ESTA.
Since you aren't spending a night in the US, say “yes” to the transit question. This will let you skip the question of where you're spending your first night in the US (and instead you'll be asked how you continue your journey).
For nationalities that aren't eligible for an ESTA, the US have a transit visa which is distinct from a visitor visa. Your travel plans are compatible with a transit visa since you are meet the requirement of “reasonably expeditious departure of the traveler in the normal course of travel as the elements permit and assumes a prearranged itinerary without any unreasonable layover privileges”.
The ESTA is a document that allows you, as a citizen from a visa-waiver nation, to fly to the USA. That's it. And since there's no airside transit in the US, you have to enter the country, on the visa waiver. You will go from JFK to Brooklyn as a regular tourist. And then leave the country there, boarding the cruise ship.
TD;DR: The purpose of your flying to the US is irrelevant: you need to enter the country when you land.