But God tells us information about the future that is contradictory sometimes. Like when He told Nineveh, through Jonah, that they were all going to be destroyed in 40 days, but then they weren't destroyed. Or when He told Hezekiah that he would die, but then He told him he would not die, but live another 15 years.
Like all God’s miracles we do not know how He does them, but we do know the results:
Acts 17:27 God did this so that they would seek him and perhaps reach out for him and find him, though he is not far from any one of us.
Ro. 8: 10 But if Christ is in you, then even though your body is subject to death because of sin, the Spirit gives life because of righteousness. 11 And if the Spirit of him who raised Jesus from the dead is living in you, he who raised Christ from the dead will also give life to your mortal bodies because of his Spirit who lives in you.
Psalm 139:7-10. "Where shall I go from your Spirit? Or where shall I flee from your presence? If I ascend to heaven, you are there! If I make my bed in ...
Jeremiah 23:24 – God Fills Heaven and Earth. “Who can hide in secret places so that I cannot see them?” declares the LORD. “Do not I fill heaven and earth ...
Hebrews 4:13 – Everything is Uncovered and Laid Bare. Nothing in all creation is hidden from God's sight. Everything is uncovered and laid bare before the ...
Do these and other verses leave you with the idea God is omnipresent?
My point is that God interacts with His creatures in time, and tells them things that might happen, depending on how they behave. I can't see how Peter was any different. Jesus told him something he would do in the future, and he did it, but it wasn't because Jesus saw it in a crystal ball or like movie that couldn't be changed. Peter, perhaps, could have repented in sackcloth and ashed, like the king of Nineveh, or wept bitterly and cried out to the Lord, like Hezekiah did, and perhaps he wouldn't have denied Jesus. Peter might even have become so distraught over the prophecy that he committed suicide, preventing him from denying Christ, but sinning in a way that he couldn't even repent from.
Jonah going to Nineveh and Hezekiah living 15 more years is actually supporting “Proof” for God knowing the future perfectly, but this takes some explaining and logical thinking:
There is a truism concerning God which Jerimiah states in Jer. 18: 7 If at any time I announce that a nation or kingdom is to be uprooted, torn down and destroyed, 8 and if that nation I warned repents of its evil, then I will relent and not inflict on it the disaster I had planned. 9 And if at another time I announce that a nation or kingdom is to be built up and planted, 10 and if it does evil in my sight and does not obey me, then I will reconsider the good I had intended to do for it.
So, what is this saying?
If God says: “I will destroy this nation in 40 days…” that must be understood as being contingent on the nation remaining the same or getting worse. So why does God not state His future actions as being contingent and say: “If you do not change I will destroy you in forty days”? God saying “if” carries the meaning, “God does not know, yet He does know”, so He cannot say “if”. He should say: “When”, so it would sound like this: “When you repent in the next 40 days, I will not destroy you”, but that is totally not a threat to them and they will have no reason to change. If the people of Ninevah have been taught by previous prophets this truism about God and maybe even the specifics of what Jonah is bringing as a warning, than they will take Jonah’s prophecy as a warning. We just do not know what the people of Ninevah were thinking just prior to Jonah.