Of course Jesus commanded it to happen. No different than Jesus commanding that Peter would deny Him 3 times. Whenever God speaks a prophetic Word of any sort, IT IS GOING TO HAPPEN. There is no "choice" available. What happened with Judas was already predetermined to transpire from Pslam 41 and verified by Acts 4:26-28. Just as much predetermined as the coming of God in flesh.
Jesus didn't just know. God Himself smote the Shepherd by Divine Pre Planned Intentions. None of the events of Christ were random accidental events caused by a bunch of "free willers" who's random decisions just happened to coincide bringing about the Exact and Perfect Plan of God in Christ.
It was not just Jesus who was in Gods Perfect Will and Plan. All of the others were moved by God as well,
even in their resistance to God. No different than God hardening Pharaoh or arousing a host of enemies toward Israel.
The notions that anything written of in the Bible is a recording or random events caused by freewillers does not and can not hold scriptural water. It is every jot and title a recording of the cause and continual interactions of God Himself within His Own creation. John 5:39. History in Biblical terms is HIStory. He being The Author of same.
And He's still writing. 2 Cor. 3:3, Heb. 4:12.
All of Satan's actions are compelled to be made. Where the Word is sown Satan has "no choice" but to "resist." That's how God made that character to perform. Satan dances in opposition to Gods Word, Work and Ways like a puppet on a string. Mark 4:15. If anyone studies how this works they'd see it in real time, themselves, personally. Romans 7:7-25, 1 Cor. 15:56. Satan is entirely "predictable" according to the ways he is compelled to make in adverse reactions to Gods Words.
Of course that's the way it was, and STILL is. God Himself is with us in all things, even planning our own steps.
Ephesians 2:10
For
we are his workmanship, created in Christ Jesus unto good works,
which God hath before ordained that we should walk in them.
Would I afford the same sight to Judas? Absolutely.
God PLANNED that Judas should betray Him. Judas was "ordained" for every step of his resisting ways as well. And Judas was not "alone" in that event. To see only Judas is to miss the obvious bad actor in the event who was IN Judas,
Satan.
We ought to recognize the much larger Divine Principle that God Himself put into play in Israel. This Divine Principle is STILL at work in the world today.
Mark 4:15. When we look at ANYONE in the Bible, other than Jesus, we should not be dissecting any of those matters apart from the fact of Mark 4:15.
For example, it was not just the masses of people calling out for the death of Jesus. They were all sinners, they all had sin, and sin, is, of course, of the DEVIL.
We can take a surface view of things, but looking past the flesh,
we'll see how The Word sees.