"Why didn't Jesus try to stop Judas from betraying Him?"
God never interferes with man's free will. As it was with satan, Judas attempted to force Jesus's hand to interfere in just such a way. Judas knew who Jesus was afterall.
I disagree. Didn't Jesus tell Mary the Prostitute to sin no more? Jesus frequently interceded and actively worked against sin. He didn't tell the Prostitute, well, just use your own free will.
Jesus taught Judas also. Judas rejected His teaching in preference for his own values. It's not like Judas was a moron and had to be taught that betrayal is wrong, what Jesus taught was right, the plots against Him were evil, and he would be a part of their evil.
Also, Mary Magdalene wasn't a prostitute. Whatever Mary did, she did by her own free will. If some prostitute repents, they do so by their own free will, for the reasons they value.
"Jesus frequently interceded and actively worked against sin. "
He taught. He never interfered.
Here's Jesus in action in John 8. He went to teach and then made requests. Let those of you w/o sin toss the first stone. Go, sin no more.
John 8:1-11
But Jesus went to the Mount of Olives. At dawn he appeared again in the temple courts, where all the people gathered around him, and he sat down to teach them. The teachers of the law and the Pharisees brought in a woman caught in adultery. They made her stand before the group and said to Jesus, "Teacher, this woman was caught in the act of adultery. In the Law Moses commanded us to stone such women. Now what do you say?" They were using this question as a trap, in order to have a basis for accusing him.
But Jesus bent down and started to write on the ground with his finger. When they kept on questioning him, he straightened up and said to them, "If any one of you is without sin, let him be the first to throw a stone at her." Again he stooped down and wrote on the ground.
At this, those who heard began to go away one at a time, the older ones first, until only Jesus was left, with the woman still standing there. Jesus straightened up and asked her, "Woman, where are they? Has no one condemned you?"
"No one, sir," she said.
"Then neither do I condemn you," Jesus declared. "Go now and leave your life of sin."
It can't be said that Judas was oblivious to all that Jesus had said and done. Judas acted on his own.