When John wrote his gospel, Peter had probably already been killed by the Roman emperor, Nero. So when he recorded the words of Jesus about Peter's coming death he was able to look back and interpret the symbolism Jesus had used. Here's what Jesus said to Peter, with John's interpretation.
"Truly, truly, I say to you, when you were younger, you used to gird yourself and walk wherever you wished; but when you grow old, you will stretch out your hands and someone else will gird you, and bring you where you do not wish to go." Now this He said, signifying by what kind of death he would glorify God. And when He had spoken this, He said to him, "Follow Me!" (John 21:18-19)
It is a sobering thing to be told by your Master and friend that you will die in his service. It was oblique, but Peter probably got the message. And who knows what look was on Jesus' face when he said it. But such is the price of following Jesus Christ. This isn't so different from what he predicts for each of us. "If anyone comes to Me, and does not hate . . . his own life, he cannot be My disciple" (Luke 14:26). "He who loves his life loses it, and he who hates his life in this world will keep it to life eternal" (John 12:25). "If anyone wishes to come after Me, he must deny himself, and take up his cross and follow Me" (Matthew 16:24). "They will put some of you to death, and you will be hated by all because of My name" (Luke 21:16-17).
Tradition says that Peter was crucified upside down in Rome during one of Nero's persecutions in the mid-sixties. The early church historian Eusebius wrote, "Peter seems to have preached in Pontus and Galatia and Bithynia and Cappadocia and Asia, to the Jews of the Dispersion, and at last, having come to Rome, he was crucified head downward, for so he himself had asked to suffer" (Ecclesiastical History, III, I).
Jesus predicted the martyrdom of Peter. Jesus knew what sort of death it would be and he knew the time frame. This much knowledge could discourage Peter. Or it could serve to remind him that, come what may, the Lord Jesus is never taken off guard. Not only that, but Jesus spoke these words to Peter after rising triumphant from the dead. This meant that "Christ, having been raised from the dead, is never to die again; death no longer is master over Him" (Romans 6:9). Therefore Jesus will be alive and ruling when Peter comes to die. He will be there to help him. "I am with you always, even to the end of the age" (Matthew 28:20). And not only to help him die, but to raise him: "If the Spirit of Him who raised Jesus from the dead dwells in you, He who raised Christ Jesus from the dead will also give life to your mortal bodies" (Romans 8:11).
Jesus knew that there would be part of Peter's will that would not want this death. "Someone else . . . will bring you where you do not wish to go." Even Jesus cried, "If it is possible, let this cup pass from Me" (Matthew 26:39). So it is with all who follow in his steps. Pain is pain, not pleasure. Only a higher love brings you to embrace it when you could avoid it by denying Christ.
John said Peter's death was to glorify God, "This He said, signifying by what kind of death he would glorify God." The way John said this seems to show that he considers all our deaths as appointed for the glory of God. The difference is: with what kind of death will we glorify God?
Are you ready for this? Will you show God great in the way you die? Will you say, "To live is Christ and to die is gain"? Will you call this ugly, defeated, torturing enemy sweet names? Will the loss of all your earthly family, friends, and possessions fade at the prospect of seeing and being with Christ?
After Jesus had predicted the horrible death of Peter, he said to him, "Follow me."
"Let us go with him outside the camp" (Hebrews 13:13).