From Wikipedia,

Columbus encountered the pineapple in 1493 on the Leeward island of Guadeloupe. He called it piña de Indes, meaning "pine of the Indians", and brought it back with him to Europe, thus making the pineapple the first bromeliad to leave the New World.

(Actually, this probably isn't quite right ... since piña also means pinecone in Spanish, and since pineapples look nothing like pine trees but quite a bit like pinecones, the meaning was undoubtedly "pinecone of the Indians".)

The question is: why did the English adapt the name pineapple from Spanish (which originally meant pinecone in English) while most European countries eventually adapted the name ananas, which came from the Tupi word nanas (also meaning pineapple).

This is pure speculation, but it may have to do with the fact that there were English colonies in the New World, and these had lots of trade with the Caribbean. If the fruit was called by one name in the Caribbean and a different name in Spain, the English could easily have ended up using the Caribbean name, while the rest of Europe used the Spanish name.