The Gospels accounts of John and Matthew present two different Apostle Peters with both being supported by two different miracle accounts when dealing with swimming.
“Then the disciple whom Jesus loved said to Peter, “It is the Lord!” As soon as Simon Peter heard him say, “It is the Lord,” he wrapped his outer garment around him (for he had taken it off) and jumped into the water. The other disciples followed in the boat, towing the net full of fish, for they were not far from shore, about a hundred yards.” (John 21: 7)
In the Gospel of John, Peter who has been swimming naked (γυμνός . . . this is the same word used by the LXX in Genesis 3: 7 and 9 when Adam and Eve are discovered naked), on seeing the risen Jesus, puts on his large outer garment (The aorist verb “ἐπενδύσασθαι” is used in 2 Corinthians 5: 2 by Paul making clear that this large outer coat will be like the new covering in Heaven), then swims 200 cubits (300 feet or the length of two Olympic-size swimming pool (less 28 feet) fully clothed even beating the disciples fishing boat back to shore or a feat that would be a challenge for even Olympic champion Michael Phelps! (Exactly why Peter had to get fully dressed before swimming remains an enigma unless John pictured both the naked Peter and the resurrected naked Jesus together just didn't morally look right.)
Text 2: Peter as a Non-Swimmer
“Shortly before dawn Jesus went out to them, walking on the lake. When the disciples saw him walking on the lake, they were terrified. “It’s a ghost,” they said, and cried out in fear.
But Jesus immediately said to them: “Take courage! It is I. Don’t be afraid.” “Lord, if it’s you,” Peter replied, “tell me to come to you on the water.” “Come,” he said.
Then Peter got down out of the boat, walked on the water and came toward Jesus. But when he saw the wind, he was afraid and, beginning to sink, cried out, “Lord, save me!”
Immediately Jesus reached out his hand and caught him. “You of little faith,” he said, “why did you doubt?”’ (Matt. 14: 25 – 31)
In this account, Peter is again first out of the boat, but now he's totally fearful of the water. Moreover, nowhere does the story in the Gospel state there was a storm on the lake, but simply water chop driven by the wind (ἦν γὰρ ἐναντίος ὁ ἄνεμος).
Peter demands proof and Jesus offers proof. Peter steps out on faith, only to walk a few steps and then sinks. Now the mighty swimmer of the Fourth Gospel does not even try to swim, but instead, goes into a panic, crying out for Jesus to save him (Κύριε, σῶσόν με).
Notice that even though it was Peter who walked on the water and it was Peter whom Jesus saved from drowning, only the disciples who stayed in the boat worshiped Jesus, “And those who were in the boat worshiped Him, saying, “You are certainly God’s Son!”’ (Matt. 14: 33)
Unlike the Peter in the Gospel of John who was so happy to see Jesus that he swam 300 feet fully clothed, this non-swimming Peter had a cruel joke played on him where Jesus had almost let him drown. (Little wonder Peter denied Jesus three times during Jesus' trail . . . payback time!)