turkey (bird) is named from Turkey (country), because it was mistakenly thought to come from there. Similarly, "peru" is "turkey (bird)" in Portuguese. It was likely named from Peru (country) because it was mistakenly thought to come from there.
"peru" also apparently is slang for "penis" in Portuguese. I don't think there is an analogous meaning for "turkey" in English. - Simon
They didn't think turkeys came from Turkey; they thought they were related to a kind of bird named for Turkey (turkey fowl). - Gabe
Yeah, you are right. They incorrectly thought they were the same type as a bird named after Turkey. Perhaps a better phrasing would have been: "turkey (bird) is mistakenly named after Turkey (country). Similarly, "peru" is "turkey (bird)" in Portuguese and is mistakenly named after Peru (country)". - Simon