Jesus makes clear, it is not necessary to believe in him in order to go to heaven. What is required is repentance and righteousness
20 For I tell you that unless your righteousness surpasses that of the Pharisees and the teachers of the law, you will certainly not enter the kingdom of heaven.
Matthew 5
16 Just then a man came up to Jesus and asked, “Teacher, what good thing must I do to get eternal life?”
17 “Why do you ask me about what is good?” Jesus replied. “There is only One who is good. If you want to enter life, keep the commandments.”
18 “Which ones?” he inquired.
Jesus replied, “‘You shall not murder, you shall not commit adultery, you shall not steal, you shall not give false testimony, 19 honor your father and mother,’[c] and ‘love your neighbor as yourself.’[d]”
20 “All these I have kept,” the young man said. “What do I still lack?”
21 Jesus answered, “If you want to be perfect, go, sell your possessions and give to the poor, and you will have treasure in heaven. Then come, follow me.”
Matthew 19
9 To some who were confident of their own righteousness and looked down on everyone else, Jesus told this parable: 10 “Two men went up to the temple to pray, one a Pharisee and the other a tax collector. 11 The Pharisee stood by himself and prayed: ‘God, I thank you that I am not like other people—robbers, evildoers, adulterers—or even like this tax collector. 12 I fast twice a week and give a tenth of all I get.’
13 “But the tax collector stood at a distance. He would not even look up to heaven, but beat his breast and said, ‘God, have mercy on me, a sinner.’
14 “I tell you that this man, rather than the other, went home justified before God. For all those who exalt themselves will be humbled, and those who humble themselves will be exalted.”
Luke 18