This is one of the reasons why we look for the resurrection of the dead. Acts 24:15 says There will be a resurrection of the righteous and the unrighteous."
This will take place after Armageddon, when the wicked who will be living at that time will be destroyed.Jesus' sacrifice makes it possible for even the unrighteous, NOT the wicked, to be resurrected.At that time, Isaiah's inspired prophecy will come true:
9 In the night I long for you with my whole being,
Yes, my spirit keeps looking for you;
For when there are judgments from you for the earth,
The inhabitants of the land learn about righteousness.
10 Even if the wicked is shown favor,
He will not learn righteousness.
Even in the land of uprightness he will act wickedly,
And he will not see the majesty of Jehovah.
11 O Jehovah, your hand is raised, but they do not see it.
They will see your zeal for your people and be put to shame.
Yes, the fire for your adversaries will consume them.
In the book of Revelation, the apostle John was also given a vision of the thrilling events that will take place during Christ’s 1000 year reign. At this time, death and Hades (mankind’s common grave) will ‘give up those dead in them.’ This means that death due to inherited sin will be gone forever. (Revelation 20:13, 14; Isaiah 25:8)
Among those resurrected to life on earth will be the "unrighteous." They will be taught and given the opportunity to learn righteousness. “Scrolls” containing instruction from God will be opened, and they will need to follow these in making their minds over in harmony with God’s will. They will be “judged individually according to their deeds” after their resurrection (Revelation 20:11-13)
There are many in this world throughout history who, because of the circumstances of their lives, were not given the opportunity to get to know their Creator and his ways. They will at this time, as Isaiah and John stated, and they will have to choose to make a change.
By responding to the education provided, even those who were once as dangerous as wild animals will be able to, of their own choice, change their ways, just as many have already done so today. Isaiah 35:5-6
Finally, those who "will not learn righteousness" will be condemned to the second death, eternally. Revelation 21:8 Satan and his demons will also be completely destroyed.
So to answer your question, God's way is always righteous and just. We often look at our own short sighted advantage,but God looks at the long term, in fact, forever. So WE have to change, not God. Ezekiel was inspired to make that point very clear, here:
“But your people have said, ‘The way of Jehovah is unjust,’ when it is actually their way that is unjust.
“When someone righteous abandons his righteousness and does what is wrong, he must die for it. 19 But when someone wicked turns away from his wickedness and does what is just and righteous, he will keep living for doing so.
20 “But you have said, ‘The way of Jehovah is unjust.’ I will judge each of you according to his ways."