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 believers 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?”
This is the disciple who testifies to these things and who wrote them down. We know that his testimony is true.
Jesus did many other things as well. If every one of them were written down, I suppose that even the whole world would not have room for the books that would be written.