Jesus had to die because it was his father's will and Jesus was aware that the Holy Scriptures had to be fulfilled as they had stated that the Son Of Man would be sent to Earth as a Suffering Servent.
In Mark's Gospel we learn that Jesus celebrated the Passover meal with his disciples for the last time and then moves on to the Garden of Gethsemane, taking Peter, James and John with him. Naturally, Jesus wanted his friends close by his side in this time of mental and spiritual suffering. Jesus must have found the thought of physical pain and torture very hard to take in. Jesus sought consolation from his father in prayer but unfortunately neither his own father nor his closest friends were helpful to him.
Jesus' disciples did not pray with him, they were "Spiritually Asleep". Not one of the disciples knew what was happening to Jesus at this time or what was going to happen to him in the coming few days.
There was also another disciple who did little to help Jesus. Judas arrived at the Garden of Gethsemane with the Temple Police. Judas betrayed Jesus for thirty pieces of silver. One thing which Mark highlighted about Jesus' hurt and annoyance was the fact that the Temple Police could have arrested him when he was preaching in the Temple. They did not have to arrest him in the middle of the night like a criminal.
The trial before the High Priests shows us that the Jews were adamant that they would have Jesus killed. There were flase witnesses, all of whom had conflicting stories and made up evidence. This trial was, of course, very unjust, and extremely unfair. Jesus was accused of blasphomy but in Roman laws blasphomy didn't carry the death penalty, so they changed the charge to suit the Roman Govenor. Thus Pilate asks if he was King of the Jews and Jesus replied "So You Say".
Pilate was thus accusing Jesus of treason, which carried the penalty of death. Pilate however knew that Jesus was innocent and attempted to set Jesus free. Pilate