We say that Heaven is a place for two kinds of people, perfect people and forgiven people. Up to now, Jesus has been the only perfect person, but He isn't the only one in Heaven. You ask, quite astutely, what about the many generations who lived before the Bible, who never heard of Jesus? The answer: Before the Bible was written, the evidence for God was available in creation, via what we call "natural revelation." But getting saved that way required a special grace from God. Those who truly desired to know Truth might be granted the grace to hear his Voice.
In Genesis, Enoch walked with God until God took him straight to Heaven. That happened because he lived so intimately with God, loved Him so much, and obeyed Him, that God accepted him as righteous because of his faith and trust and love. Thus, God made a special plan for him. He decided that he didn't deserve to die like a common man and took him to Heaven. Enoch had the kind of relationship with God that Adam was meant to have, walking with God in the Garden. He wasn't perfect, but because of his faith, he was forgiven. By contrast, most of the rest of humanity was following the promptings of the fallen angels, lying and misleading them to follow their own desires.
Abraham, too, was willing to listen, follow and obey God when he was called out from Mesopotamia. He didn't have a Bible, but he had a heart that desired Truth. Thus, when God called his name, he responded with faith. Abraham left his city, his father, and his work to follow the Voice of God into a new land, and he chose to believe when God offered him a future in Covenant between Himself and his descendants forever. When he was tested, Abraham didn't even withhold his only legal son, who would inherit the birthright. He was willing to offer everything most precious to him as a sacrifice if God wanted it. This was the kind of faith that God wanted from his people, so He counted it as if Abraham was righteous.
Moses was given up for adoption, and raised as a prince in Egypt, so his heart was filled with compassion for all people. Yet, he was a man of violence and killed a man for abusing a slave. When he fled into the desert, God spoke to him by a miracle, and he listened and humbled himself. God gave him a role in his plans, to save the slaves from bondage and return them to the promised land. Moses believed, and had the faith to follow Him back to Egypt, to oppose Pharaoh and lead his people back to Canaan, and so, God reckoned that faith for him as righteousness. Moses was given the Ten Commandments, and God told him how to build the Ark of the Covenant so that He could dwell among his chosen people. Moses was forgiven his sins, and became the Prophet and Lawgiver for God's people.
King David, who grew up as a shepherd of sheep, loved the Lord and spent his lonely hours in prayer and song to God. He was brave to defend his sheep, so God chose him to lead and protect his people. When he was called, David believed, and despite all the challenges he would face, he chose to follow his Lord and believe his promises. David became known as "a man after God's own heart," and God recognized his faith as righteousness, even when he made mistakes. David knew how to repent when he sinned, and God accepted his humility. Thus, David was promised that the Messiah would come from among his descendants.
The prophet Elijah was taken to Heaven in a fiery chariot. He was chosen like Enoch and didn't have to die, because of his faith and intimate relationship with God. He had served God faithfully for a lifetime, and allowed the Holy Spirit to dwell in his heart. He had dared to speak Truth to power, offending the King and Queen, and the priests of Baal. But he believed, and God proved his Word. Thus, God considered him righteous because of his faith, just as He had done for Abraham. Elijah only had the Law of Moses to follow, and parts of the histories of Judah and Israel. But he had faith in the plans and beneficence of God, and he fought to keep his people on the right track. He listened and followed God's Voice, and was one of his greatest prophets.
All of these men, and I could list more, lived before Jesus, and none was perfect. But they believed in God and put their faith in Him without receiving the written revelation of the Bible. We can still learn from the natural world around us, and from human nature, to see that God exists, and we can seek to know Him intimately. God loves those who seek to know Truth, and He often speaks to those willing to listen. He blessed the ones who followed and humbled themselves in faith and obedience, even before they had received the message of Christ through the Bible. He can teach us what He wants us to know. The trouble, from the beginning up to now, is that almost no one ever did that. It's not that easy. So God made a more obvious Way for us to follow the Truth and find eternal Life. He sent his true Son, Jesus, to be our Messiah. That was his plan from the very beginning. But now, we must have faith in Jesus, and believe that He is the Voice of God, who reveals the Way, the Truth and the Life. Now, we have the Gospels and the Bible.
No one discovers God in his creation unless they think to ask the big questions, and then they need to discern and accept the answers before them. They have to choose to love God and walk with Him for the rest of their lives. How many have gone to Heaven before the Bible promised that Jesus was coming to save us? Too few. The world is fallen, and full of temptations and distractions, leading us to ignore God's Voice. Then, after the time of Abraham, and once the Torah was written, many more have been saved, but still too few. That's why we need Jesus.
When Jesus came, He chose to complete God's plan to be merciful to us. He died to forgive and save us. All those who choose to believe and follow him will be saved. It is on us to recognize the Truth given us in special revelation and see the evidence left for us to piece together. Now, the problem of filling Heaven rests with us to believe and carry the Gospel to the whole world. We will have God's help to succeed. Then, only those who refuse to believe and repent, those who refuse to have faith and follow Jesus, will be judged on the Last Day as stubborn and unforgiven. They are the ones going to Hell.
Jesus let Himself be crucified so that we could avoid that dreadful fate. He died and was buried. While his body was in the grave, He went down into the stillness of Sheol, a dark place of eternal sleep, where those who had died uncertainly awaited their fate. He called to those who had hoped for a Saviour, offering them the chance to follow Him. Those who believed were promised that they would rise on the day of resurrection. Then on the third day, He rose from the dead Himself, to prove He has the power to keep his promises.
After the Last Judgment, those who have rejected Jesus and refused his mercy will be cast into the pits of Hell, also known as Gehenna, the place of eternal exile, darkness and fiery punishment, a smoky trash heap where the refuse is forever burning. There, the rebel angels suffer torment forever in the Lake of Fire, down at the very bottom. They deserve their punishment for having defied God and defaced his image which He put into humanity. We, too, will have deserved such punishment, if we deny the Truth and refuse God's offer of mercy and grace. It's not God's choice to abandon us to Hell, but ours, if we refuse to have faith and accept his gift of righteousness.
If you have not yet decided to believe in God and accept Jesus as your Lord and Saviour, let this be the day. You are not perfect, I know, because not one of us is perfect. We have all sinned and fallen far short of God's original hope for us. But God sent his only begotten Son to live a perfect life among us and to sacrifice Himself to pay our penalty for sin. That is how much He loves us, and how far He extends his mercy and grace to save us. Jesus died for you, but God raised Him from the dead, to prove the Truth of his promises. He promised to raise us up, too, and to share his Life with us, if we put our faith in Him. Then, after He told us to spread the Good News around the world, Jesus rose up to Heaven while all of his disciples watched. So on this very day, let your heart be opened to his love. Ask Jesus to be your Lord and Saviour, turn from those sins which your conscience has been convicting you for, and decide to follow the Voice of God.
Jesus is Lord, the Son of the Living God, the promised Messiah, who came to redeem Humanity from the depravity of sin. Without Him, Satan has a claim on your soul, because you listened to him prompting you to follow your own way. Choose now to repent, turn around, and follow Jesus. Be reconciled to God, and let Him count your faith as Jesus' righteousness. It's his gift to you.