Some say it was impossible for Jesus to sin. Their argument goes something like this: It was prophesied that Jesus would die for the world. Jesus could not die for the world unless He lived sinless. Therefore it was impossible for Jesus to sin else the prophecy would not have been fulfilled.
This argument ignores the difference in foreknowledge and predestination. I knew every day when I got home from work that my seven year old son Wesley was going to ask me to play ping pong, but I didn’t force that; he had a free will choice in the matter. Likewise, the Father absolutely foreknew (with 100% certainty) that Jesus was not going to sin (even though Jesus had free will in the matter), and the Father used that foreknowledge as an essential element in His plan to save the world.
This is similar to Jesus knowing ahead of time that Judas would be the betrayer (John 13:21,26, Matt 26:21,25), but that doesn’t mean God forced Judas to betray Jesus, that Judas didn’t have a free will choice in the matter. Likewise, Jesus “prophesied” that Peter would deny him three times (Matt 26:34), but this doesn’t mean Peter was forced to betray Jesus in order to fulfill that prophecy, does it?
God’s plan to save the world included predestination and foreknowledge according to Acts 2:23 – “Him, being delivered by the determinate counsel and foreknowledge of God, ye have taken, and by wicked hands have crucified and slain.” Jesus avoided all sin, not because He had to, but because He chose to. What a great accomplishment! What a benefit to us!