The purpose of Jesus’s trip to Jerusalem was to die. He went there because that’s where prophets die. (Besides, not having to live with the people of his generation anymore would be a relief.) Jesus described his approaching death as him laying down his life of his own accord, rather than others taking his life from him. The epistles describe it the same way, as a willing self-sacrifice.
Jesus didn’t think having your earthly body killed was anything to be afraid of. He could have easily avoided death if he’d wanted to, but he chose to let people kill him in order to fulfill the scriptures. When Peter tried to defend Jesus from the people who wanted to kill him, Jesus told him to stop, because Jesus wanted to do whatever his father’s will was, and God’s will was for Jesus to die.
When his enemies started plotting to kill him, Jesus avoided them. When people tried to stone him to death, he ran away. Jesus was in anguish at the thought of what his father had planned for him,1 and he repeatedly fervently begged in tears for God to spare him. He pointed out that God was all-powerful, which meant he could easily avoid this if he really wanted to, and could accomplish the same goals in a different way, without anyone having to suffer and die. When God let him be crucified anyway, Jesus thought God had forsaken him.