“When Jesus spoke again to the people, he said, “I am the light of the world. Whoever follows me will never walk in darkness, but will have the light of life.””
John and Peter, of all the disciples had a special relationship with Jesus. Jesus even allowed them time to commune with Elijah and Moses. John writes in a particular style that is also evident in his letters and in Revelations. Earlier, John had written that Jesus was the Word made flesh. That flesh was sacrificed by God, as a gift to those whom God loved, so that God could abide them Because eternal life is close proximity to God. And to perish is to be utterly riven from God.
In this verse, Jesus is defending his self witness to Pharisees.