I recommend this short article on the topic, if you've ben wondering about this. It's especially appropriate today - "Maundy Thursday"- as we remember the Last Supper and the subsequent betrayal.
Jesus chose Judas to be a part of the twelve, but yet knew he would betray him (Mark 14:18, 21; John 6:70). Luke tells us in Luke 22:3 that, “Satan entered into Judas called Iscariot.”
So, was Judas a mindless zombie, set on an uncontrollable mission by the hand of God to betray Jesus?
God did not force Judas’ hand. Judas made conscious choices every step of the way and eventually he chose to betray Jesus.