This june I'm planning to travel from NYC to Cancun, not a big deal, I guess, but I just wonder - is there any way to travel this very route by boat?
There might be. Ask at your local yacht club, jetty or harbor master. Often they have have a notice board or maybe even a website where you can post or enquirer about a lift. Depending on your negotiation skills, you might have to pay for the trip or help out on the boat in exchange.
The Go-Panamerican Web site seems not very active (last updated 2006), but some people still post trips in the notice board from North to South America there, looking for passengers - but they prefer the overland route.
There are certainly proper cruises from the New York area to Cancun and nearby Cozumel in June, for instance on Royal Caribbean. They mostly run round trip so you would need to leave the cruise early and this requires getting approval from the cruise line.
I doubt it would make financial sense, especially as a single traveler who has to pay double as a single supplement. You would also be paying for the travel time back to NYC when you aren't on the ship.
You can easily book a cruise with Norwegian Cruise Line, there is a cruise ship specifically coming out of NYC and it's brand new. NCL cruise style is way more relaxed than the other companies so you might feel more comfortable and relax until you get to Cancun.