That was a synonym pun.
More like a homonym pun. Synonyms have the same general meaning. More accurately a homophone pun since both the spelling and the meaning are different, but the sound is the same.