"the main thing He came to earth to do was to suffer and be killed"
Public Domain"Ecce Homo" by Mateo Cerezo the Younger (1637–66)

According to the Gospels, Christ predicted His own death and resurrection.

Matthew 16:21: From that time Jesus began to show his disciples that he must go to Jerusalem and suffer many things from the elders and chief priests and scribes, and be killed, and on the third day be raised.

Luke 18:31-33: And taking the twelve, he said to them, "See, we are going up to Jerusalem, and everything that is written about the Son of Man by the prophets will be accomplished. For he will be delivered over to the Gentiles and will be mocked and shamefully treated and spit upon. And after flogging him, they will kill him, and on the third day he will rise."

John 10:17-18: "For this reason the Father loves me, because I lay down my life that I may take it up again. No one takes it from me, but I lay it down of my own accord. I have authority to lay it down, and I have authority to take it up again. This charge I have received from my Father."

John 12:32-33: "And I, when I am lifted up from the earth, will draw all people to myself." He said this to show by what kind of death he was going to die.