Men that haven't heard about Jesus can be judged by the amount of light they have received from God:
We are judged in light of the law of conscience:
Romans 2:15 They show that the requirements of the law are written on their hearts, their consciences also bearing witness, and their thoughts sometimes accusing them and at other times even defending them.)
We will be judged by the light of creation:
For the invisible things of him from the creation of the world are clearly seen, being understood by the things that are made, even his eternal power and Godhead; so that they are without excuse:
Romans 1:20 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 people are without excuse.
These are lesser things for them to be accountable for so if they can't be accountable to what is right, why would they be accountable to the gospel? The other thing is that God would be just by sending me to hell because if God was to get rid of the evil then He would have to get rid of me because I've hurt people unintentionally, I've made mistakes and I've done wrong. The fact that we are here meant we got a second, some a third, some a fourth, etc., chance because God is good and merciful already to people.
They will be judged by the amount of light they received.
And it is sort of like this. If we agape (love) evil then we will reject the gospel and if we love righteousness, we will love the gospel. You don't have to hear the gospel for God to know what you would choose.
The condemnation is not just that people rejected the gospel or people didn't hear the gospel. The condemnation is the reason:
"And this is the condemnation, that light is come into the world, and men loved darkness rather than light because their deeds were evil. For every one that doeth evil hateth the light, neither cometh to the light, lest his deeds should be reproved. But he that doeth truth cometh to the light, that his deeds may be made manifest, that they are wrought in God."-John 3:19-21
If we replaced light with accepting the gospel and darkness with rejecting the gospel, God can show pretty much how people lived their lives live up with them being consistent with decisions they haven't had.
23 But he that received seed into the good ground is he that heareth the word, and understandeth it; which also beareth fruit, and bringeth forth, some an hundredfold, some sixty, some thirty.-Matthew 13:23
https://www.biblegateway.com/passage/?search=Matthew+13&version=KJV
But because the gospel is heard, the amount of light is greater and since Jesus is the light, lets test whether people will love the person of truth by not only by how they live their lives but whom they accept or reject.
What about those who never heard?
What of those who have never Heard?