Baptism is not required to go to Heaven. Baptism is a public declaration of faith in Jesus Christ and an act of obedience.
As a public declaration of faith in Jesus Christ, baptism shows others that we have died to our old lives and are raised to live new lives in Christ. Romans 6:4 says, “Therefore we are buried with Him through baptism into death, that just as Christ was raised from the dead by the glory of the Father, even so, we also should walk in newness of life.” Just as Jesus died and was buried, we lie back as a picture of death and go under the water as a picture of burial. Then, just as Jesus was raised to life on the third day, we come up out of the water as a picture of His resurrection. We do this in front of the church as a declaration of our faith.
As an act of obedience, baptism shows that we are ready to obey the call of Christ to a new way of life. Jesus was baptized Himself. You can read about it in all four of the Gospels: Matthew 3, Mark 1, Luke 3, and John 1. Jesus began His public ministry after He obediently went to John and was baptized. The same goes for us. We receive salvation, get baptized, and then begin ministry as children of God.
Did the river water make Him Jesus? No. Did John the baptizer make Him Jesus? No. Neither does baptism make us Christians. No act of man is involved in salvation. Read these verses: “that if you confess with your mouth the Lord Jesus Christ and believe in your heart that God raised Him from the dead, you will be saved. For with the heart one believes unto righteousness, and with the mouth confession is made unto salvation. For whoever calls on the name of the Lord shall be saved” (Romans 10:9-10, 13).
In Matthew 28:18-20, Jesus commands baptism in the Great Commission. Part of the Christian’s role in leading people to Christ is seeing that they are baptized after salvation. Baptism naturally follows salvation, but it is secondary in importance.