Did Jesus know ahead of time that Judas would betray him, or was he surprised that a man he walked with and talked with would turn against him?
Did Judas surprise God? Did God have to scramble around trying to pick up the pieces? Did God have to yell down to Jesus, “Hey, I guess it’s plan B?”
Unless all is predestined, this is the scenario you are left with.
You are confusing foreknowledge with (double)predestination.