"I tell you the truth, when you were young you dressed yourself and went where you wanted; but when you are old you will stretch out your hands, and someone else will dress you and lead you where you do not want to go." Jesus said this to indicate the kind of death by which Peter would glorify God. Then He said to him, "Follow me!"
Peter turned and saw that the disciple whom Jesus loved was following them. (This was the one who had leaned back against Jesus at the supper and had said, "Lord, who is going to betray you?") When Peter saw him, he asked, "Lord, what about him?"
Jesus answered, "If I want him to remain alive until I return, what is that to you? You must follow me." Because of this, the rumor spread among the brothers that this disciple would not die. But Jesus did not say that he would not die; He only said, "If I want him to remain alive until I return, what is that to you?" [John 21:18-23/NIV]
Peter was clearly bothered that Jesus had announced his (Peter's) martyrdom, but hadn't bothered to announce anyone else's. It was as though he were saying, "What! I have to die, but John here is gonna get off scott free?" And Jesus simply told Peter to mind his own business. As the text points out immediately thereafter, Jesus was not suggesting that John would never die. As modern readers of the Word, it is critical that we not make the same errors made by the believers of Jesus' time -- assuming facts not in evidence.
So again, the message and meaning of this text is, "Just follow Jesus and mind your own business," not, "John will never die".
Hope this helps.