Jesus said to Peter, “If it is my will that [John] remain until I come, what is that to you? You follow me!”
John 21:22
Yeshua wasn't saying that John would never die, only that it wasn't Peter's concern. It is still interesting to note that John was the only one of the Twelve to die of old age and not martyrdom.