Declaring the end from the beginning, And from ancient times things that are not yet done, Saying, "My counsel shall stand, And I will do all My pleasure." (Isaiah 46:10)
God knows the future, because he holds the future. He is never surprised, because he is not surprised at his own work.
What God knows is what God will do. The future is not some kind of freewheeling reality separate from God’s will that He is trying to catch and adapt to. He knows the future because he plans the future, and he is never surprised by what he plans.
In His Word, He promises us that His plans for us are good, to give us hope for our future. How can He promise this? Because He is the Lord over all time - past, present and future. Nothing that happens to us in our lives is a surprise to God. We can rest in knowing that.
"Nothing in our lives takes God by surprise."
- Billy Graham