There is a misconception that only "good" people will go to Heaven. Perhaps you would like to know what the Scriptures say about this.
A man named Nicodemus came to Jesus. A man that most would consider to be a good and a righteous man. He was a Pharisee...a ruler of the Jewish people and a teacher of the Law of Moses. And yet, Jesus told him that if he wanted to see the Kingdom of God, he would have to be born again. (John 3:1-8) Now you'd think that this would have been a good time for Jesus, who always spoke the truth from God, to have said to a man such as this: "Just keep doing what you are doing and you will enter the Kingdom of God." But He did not say that. He told this very devout man that he had to be born again (in other words, born of the spirit (John 3:8) if he wanted to enter the Kingdom of God
Another example is found in the gospel of Luke 23:39-43. This is the record of the two malefactors being crucified with Jesus. Malefactor means: evil doer. One of the malefactors mocked Jesus, but the other one reprimanded the mocker saying: Have you no respect? We are here because of the evil that we did, but this man (referring to Jesus) is innocent. Then he asked Jesus if He would remember him when He entered into His Kingdom. Jesus answered this man's request by guaranteeing him a place in Paradise. A man who, even by his own admission (Luke 23:41) was a criminal, was given this promise by Jesus Himself! Now ask yourself, what good works did this condemned man do to deserve to be in Paradise? But what the man did do was recognize that he was a sinner and that Jesus was the Savior from sin and acknowledged Him as such. And by putting his faith in Jesus, he received such mercy.
Time and time again Jesus was confronted with self-righteous men, many of whom were religious leaders, who were offended at the idea of needing a Savior/Messiah, even though the belief in which they boasted was entirely based upon the promise of the coming of One. These people trusted in their own works to make them righteous before God. Jesus' answer to this "holier that thou" attitude was: "The crooks and the prostitutes will enter the Kingdom of God before you". (Matthew 21:31) He also told them: "I came not to call the 'righteous' but sinners to repentance."(Luke 5:32)
We all have sinned and fallen short of the glory of God.(Romans 3:21-24) If people could make themselves righteous before God simply by following the tenents of some religion or, as some suppose, by doing what they think is right, then Christ died in vain. (Galatians 2:21) In Matthew 26:36-44 it says that three times Jesus asked God if there was ANY OTHER WAY that the sins of the people could be atoned for, other than Him having to lay down His life for them. If EVER there was a time for it to have been said from Heaven; "Just tell them to do good works or follow their respective religions and they will be saved" this would have been the time. But, as we know, it wasn't.
Now for those of us who have accepted the fact that we are sinners, this puts us in a better position to recognize our need for a savior. JESUS IS THAT SAVIOR!
I am the way, the truth and the life, no one comes to the Father but through me.
If you confess with your mouth, "Jesus is Lord"(Ruler), and believe in your heart that God raised Jesus from the dead, you will be saved.
For it is by grace you have been saved, through faith and this, not from yourselves, it is the gift from God, not of works so that no one can boast.
1 John 5:1
Whoever believes that Jesus is the Christ (Messiah) is born of God: and everyone who has love for the Father has love for His child."