God Knew They Would Turn Away

Did God know that Israel would turn away from Him before they even entered the Promised Land? If He did, what does that tell us about Israel’s restoration, God’s promises concerning Jerusalem, and the day when each one of us will stand before Him?