Allah is The Absolute Just, Merciful and All Knowing. He never punishes those who do not know the religion of Islam. He said in Quran : We never punish any one till We send a messenger وما كنا معذبين حتى نبعث رسولا (Sura 17, verse 15).
Those who did not know the message if Islam and died on that ignorance will be given a full chance in the Day of Judgement to know then will be given full option to think and decide then respond.
The Justice and Mercy of Allah will never allow punishing any one before providing him full chance of knowing and deciding with his free will.