Analyzing Jesus’ words "I am the way" (John 14:6) in the context of the whole Bible means that Jesus is the way for sinful mankind to reconnect with a holy God. This means more than just following the teachings of Jesus. It means that Jesus himself, through His life, death, and resurrection, made THE way for us to be reconciled to God. He makes it possible to have a relationship with God.
Hebrews 10:1-4 tells us that Jesus was the Way for the believers in the Old Testament as well as the New:
For the Law, since it has only a shadow of the good things to come and not the very form of things, can never, by the same sacrifices which they offer continually year by year, make perfect those who draw near. Otherwise, would they not have ceased to be offered, because the worshipers, having once been cleansed, would no longer have had consciousness of sins? But in those sacrifices there is a reminder of sins year by year. For it is impossible for the blood of bulls and goats to take away sins. (NASB)
The sacrificial offerings, by the Old Testament believers, were reminders (shadows) of the true sacrifice which would come later. This true sacrifice was Jesus Christ. Jesus paid for the sins of both Old and New Testament believers.
By this will we have been sanctified through the offering of the body of Jesus Christ once for all. (Hebrews 10:10 NASB)
The writer of Hebrews restates the contrast being made between the ceremonial sacrifices and the true Sacrifice in this passage:
Every priest stands daily ministering and offering time after time the same sacrifices, which can never take away sins; but He, having offered one sacrifice for sins for all time, SAT DOWN AT THE RIGHT HAND OF GOD, For by one offering He has perfected for all time those who are sanctified. (Hebrews 10:11-14 NASB)
It is Jesus who did all that needs to be done for us to be reunited with God, to have our sins forgiven, to be filled with the wonderful presence of the Holy Spirit, and to be assured of an eternity with Him.
…we have confidence to enter the holy place by the blood of Jesus, by a new and living way which He inaugurated for us through the veil, that is, His flesh (Hebrews 10:19-20 NASB)
What is the Way to heaven? Trust in the life and work of Jesus Christ.