Yes, Jesus did realize some people would oppose Him, and that eventually they would enter into a conspiracy to kill Him. He told His disciples, "The Son of Man is going to be betrayed into the hands of men. They will kill him, and after three days he will rise" (Mark 9:31).
And yet Jesus deliberately refused to escape from them -- although He easily could have done so. Why? The reason is because He knew that God had sent Him into the world for one reason: to become the final and complete sacrifice for our sins. He was without sin, but on the cross all our sins were placed on Him, and God's judgment for sin fell on Him. This is what Christians mean when they say that "Christ died in my place."
If there had been any other way for our sins to be erased, Jesus Christ never would have had to die. But there was no other way. God is holy and just, and because of that our sin had to be punished. We deserved that punishment, but in His love, Jesus Christ took it for us. The Bible says, "This is love: not that we loved God, but that he loved us and sent his Son as an atoning sacrifice for our sins" (1 John 4:10).
In just a few days, Christians around the world will celebrate Jesus' death and resurrection. I invite you to join them by giving your life to Jesus, and thanking Him for giving His life for you.