Heaven (eternal life) is a free gift based on God's grace.
"For it is by grace you have been saved,
through faith - and this is not from yourselves,
it is the gift of God - not by works,
so that no one can boast." Eph. 2:8-9
We do not deserve the gift of heaven.
As it is written, "there is none righteous, no not one." Rom. 3:10
"For all have sinned and come short of the glory of God." Rom. 3:23, and James 2:10)
There is a penalty for sin.
"For the wages of sin is death." Rom. 6:23, Rom. 5:12, and Heb. 9:27.
God is just - He must judge sin.
But, God is also love. He has provided a substitute for us.
Jesus Christ is our only way to heaven. He satisfied the penalty (judgment) for our sins.
"God demonstrates His own love for us in this: while we were still sinners, Christ died for us."
Rom. 5:8, I Pet. 3:18, John 14:6
We must each personally trust Jesus Christ alone
to forgive our sins and bring us into a right relationship with God.
"That if you confess with your mouth 'Jesus is Lord,'
and believe in your heart that God raised Him from the dead,
you will be saved.
For everyone who calls on the name of the Lord will be saved." Rom. 10:9, 13, Acts 4:12, John 1:12