U.S. author Chris Matthews makes the claims in Jack Kennedy: Elusive Hero. He unearthed notes written by George St John, the President’s former headmaster at Choate School in Connecticut, which suggest he had been aware of the 'ask not' line for many years.
The papers quote a Harvard College dean's refrain: 'As has often been said, the youth who loves his Alma Mater will always ask not "what can she do for me?" but "what can I do for her?"'
https://www.dailymail.co.uk/news/article-2056020/JFK-stole-ask-country-speech-old-headmaster.html
Ready to stand, but don't much care for the plagiarized words.