Is there any way to travel to either Jamaica or Trinidad by ferry from anywhere in Europe?
I only need it one-way. I would rather avoid long-haul flights.
You're probably out of luck without delving into the world of freighter travel or private boats.
There are cruises from Europe to the Caribbean. However none that I could find go via Jamaica or Trinidad and Tobago. Royal Caribbean, for instance, only runs them via Puerto Rico. Compilation sites also don't list those two as possible stops either.
Assuming you get to the Caribbean, travelling on to those two by boat are still limited:
Because of the fact that Jamaica is not really close to most other Caribbean islands, international services are non-existent.
Similarly, nothing actually running is listed for Trinidad and Tobago (the one ferry line mentioned has last updated their website in 2011 mentioning they are "looking forward to the launching date to be executed").