How about those who lived in the Americas, Australia or elsewhere without access to Jerusalem?
They had the law of conscience.
Also, every human being has been exposed to the world in some way. The Apostle Paul says:
Rom 1:18 For the wrath of God is revealed from heaven against all ungodliness and unrighteousness of men, who by their unrighteousness suppress the truth.
Rom 1:19 For what can be known about God is plain to them, because God has shown it to them.
Rom 1:20 For his invisible attributes, namely, his eternal power and divine nature, have been clearly perceived, ever since the creation of the world, in the things that have been made. So they are without excuse.
Rom 1:21 For although they knew God, they did not honor him as God or give thanks to him, but they became futile in their thinking, and their foolish hearts were darkened.
Rom 1:22 Claiming to be wise, they became fools,
Rom 1:23 and exchanged the glory of the immortal God for images resembling mortal man and birds and animals and creeping things.
Therefore, since our divine Creator has revealed his unlimited creative power in the designs and beauty of his created things and people, all humans are without any excuse for turning their backs on the divine Creator and depending on his creation for security and meaning in their lives instead (verse 20).