Jesus claim that he was "the way, the truth, and the life," comes in the context of a long speech and prayer that cover four chapters in the Gospel of John. That gospel itself is very much about who Jesus is, and there are many times when Jesus says "I am..."
A good brush up on the gospel of John is good to help make sense of it all. Here are links to the Bible Project guys with their summary of the gospel. (you will have to click to the link on the page to view the videos).