US, 1902, presumably from shared initial pe-. Compare the use of other men’s names as slang terms for the penis, e.g., dick, willy, johnson, John Thomas, etc.
Practice speaking and memorizing "peter" and many other words and sentences in English.