Deuteronomy 1:39
And as for your little ones, who you said would become a prey, and your children, who today have no knowledge of good or evil, they shall go in there. And to them I will give it, and they shall possess it.
James 4:17
So whoever knows the right thing to do and fails to do it, for him it is sin.
Also Paul clearly explains in Chapter 7 who he is speaking to in chapter 6.
Rom. 7:1 Or do you not know, brethren (for I am speaking to those who know the law), that the law has jurisdiction over a person as long as he lives?
I did not write the following but it sums up my belief in the subject pretty well.
A way of answering your question might be to answer the following: “How were people saved prior to Christ’s crucifixion and resurrection?” People then were saved by responding positively to God’s revelation. In other words, people are held accountable for what they know. How much light has a person received from God? Whatever that is, that is what they’re accountable for. The same would be true for people today who have never heard of Jesus.
If someone lived in China prior to Christ’s death and resurrection, how could they be expected to believe in Jesus’ death and resurrection for the forgiveness of their sins? Obviously, they could not believe in something they had never heard. In fact, that’s what the Bible tells us: “How shall they believe in Him whom they have not heard?” (Romans 10:14)
Questions about faith? Bring your doubts
Why would I need faith?: Find some answers
God doesn’t expect people to respond to something they’ve never heard. But He does hold us accountable for what we HAVE heard. This idea is expressed by the following passage: “sin is not taken into account when there is no law” (Romans 5:13). If a person cannot respond to the good news of Jesus dying on their behalf (because they haven’t heard that good news), what are they accountable to respond to?…
The Bible tells us that there are some basics. First, all people are accountable to know that God exists. “For since the creation of the world God’s invisible qualities — his eternal power and divine nature — have been clearly seen, being understood from what has been made, so that men are without excuse” (Romans 1:20). The complexity of the world around us tells us that there is a God (even though people can suppress that knowledge in their heart). Even those who haven’t heard of Jesus are accountable for knowing that God is.
Second, we’re all accountable for knowing that we are sinners. The Old Testament law proves that we’re sinful. Who has perfectly loved God or their neighbor? Therefore, “through the law we become conscious of sin” (Romans 3:20). But what about people who do not know the Old Testament law?
The Bible tells us that even people who don’t have that law nonetheless have their own “law” — their own moral standard within their hearts (Romans 2:14-15). For example, if in his heart Nick believes it is wrong for others to talk behind his back, then that is a law within his heart. Therefore, when Nick talks behind someone else’s back, he has disobeyed the moral standard within his heart, thus proving he is a sinner.
So the two basics of revelation from God are (1) that God exists and (2) that we humans are sinners. How does one respond positively to these things? Well, if there is a God and we are sinners, then we need to humble ourselves before Him. Even the person who never hears about Jesus is accountable for humbling himself before God. In fact, the Bible speaks of a future time when God will proclaim the following “eternal gospel” to every nation, tribe, language and people on Earth: “Fear God and give him glory, because the hour of his judgment has come. Worship him who made the heavens, the earth, the sea and the springs of water.” (Revelation 14:7)
In times past (prior to Jesus’ death and resurrection), people were saved by humbling themselves before God. God can have compassion and mercy on whomever He chooses (Romans 9:15), and He alone knows people’s hearts. Today, when a person hears the Gospel of Jesus Christ, they will respond positively to it if they are humbling themselves before God.
For those who don’t hear about Jesus, they still need to humble themselves before God. That means that they cannot trust in themselves for their salvation. Meaning, a person cannot think they can earn God’s favor by following religious rituals. That is an error because it’s like telling God, “I’m not a sinner — just look at all the good things I’ve done!” Therefore, it is a rejection one of the basics of God’s revelation to us: that we are sinners who need forgiveness from God.
But know that no matter who is saved, they will receive salvation on the basis of God’s grace, not by their works. God’s grace was given through Jesus’ death and resurrection. His atoning work is the way into heaven, even for those who have never heard of Him but who nonetheless are shown mercy from God. Jesus said, “I am the way, and the truth, and the life. No one comes to the Father but through Me” (John 14:6).
And He has commanded His followers to tell others about Him. He commanded them to go to the ends of the earth to declare His message of forgiveness of sin and offer of eternal life (Matthew 28:18-20). For, as the Bible tells us, with His blood He purchased people “from every tribe and tongue and people and nation” (Revelation 5:9).