There are several references in the Synoptic Gospels (the gospels of Matthew, Mark and Luke) to Jesus predicting his own death, the first two occasions building up to the final prediction of his crucifixion.  Matthew's Gospel adds a prediction, before he and his disciples enter Jerusalem, that he will be crucified there.

Gospel of Mark

In the Gospel of Mark, generally agreed to be the earliest Gospel, written around the year 70, Jesus predicts his death three times, recorded in Mark 8:31-33, 9:30-32 and 10:32-34. Scholars note that this Gospel also contains verses in which Jesus appears to predict his Passion and suggest that these represent the earlier traditions available to the author. Some scholars, such as Walter Schmithals, suggest a redactional formulation of the author, though Schmithals states there are "vexxing questions" relating to the sayings. Meanwhile, other scholars analyze these arguments and present a different view, and believe these sayings are historical. Ultimately, no consensus has emerged among scholars.

The setting for the first prediction is somewhere near Caesarea Philippi, immediately after Peter proclaims Jesus as the Messiah. Jesus tells his followers that "the Son of Man must suffer many things and be rejected by the elders, chief priests and teachers of the law, and that he must be killed and after three days rise again". When Peter objects, Jesus tells him: "Get behind me, Satan! You do not have in mind the things of God, but the things of men". ()

Gospel of Matthew

The Gospel of  includes this episode, saying that Jesus "from that time", i.e. on a number of occasions, 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 ...".

The Gospel of  shortens the account, dropping the dialogue between Jesus and Peter.

Each time Jesus predicts his arrest and death, the disciples in some way or another manifest their incomprehension, and Jesus uses the occasion to teach them new things. The second warning appears in  (and also in ) as follows:
 
He said to them, "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." But they did not understand what he meant and were afraid to ask him about it.

The third prediction in  specifically mentions crucifixion:
Now as Jesus was going up to Jerusalem, he took the twelve disciples aside and said to them, "We are going up to Jerusalem, and the Son of Man will be betrayed to the chief priests and the teachers of the law. They will condemn him to death and will turn him over to the Gentiles to be mocked and flogged and crucified. On the third day he will be raised to life!"

The fourth prediction in Matthew is found in , immediately before the plot made against him by the religious Jewish leaders:
"As you know, the Passover is two days away — and the Son of Man will be handed over to be crucified."

The hypothetical Q source, widely considered by scholars to be a collection of sayings of Jesus used, in addition to the Gospel of Mark, by the authors of the Luke and Matthew Gospels, contains no predictions of the death of Jesus.

Gospel of John

In the conversation with Nicodemus in the Gospel of John, Jesus pointed Nicodemus towards his death when he said Just as Moses lifted up the snake in the wilderness, so the Son of Man must be lifted up
Jesus was intimating that something similar would happen to him as in Numbers 21:4-9, where Moses raised a bronze statue of a serpent up on a pole. 

In chapters 12 to 17 this gospel also mentions several occasions where Jesus prepared his disciples for his departure, which the gospel also refers to as his "glorification":
 
Jesus answered them, saying, “The hour has come that the Son of Man should be glorified. Most assuredly, I say to you, unless a grain of wheat falls into the ground and dies, it remains alone; but if it dies, it produces much grain.

Comparison of Synoptic Gospel predictions

In each of the Synoptic Gospels, Jesus foretells of his own death and resurrection after three days. The concordances are summarized in the following table:

As shown in the Daily Mass Readings provided in the Latin Rite of the Roman Catholic Church, the prediction given by Jesus in Mark 9:32 has one of its main references in the Wisdom of Solomon:

Historical context

The gospels report Jesus making predictions about the "Son of Man." This is a Hebrew term with five different meanings, depending on the context in which it is used: all mankind (humanity as a whole), a human being (a man, as opposed to God), a personal pronoun ("I", "myself"), a sinner (an unjust person, as opposed to a just person), and the messiah (the awaited king).

Jesus predicted that the Son of Man would be handed over/betrayed to the elders, the chief priests, the scribes, and the teachers of the law. In the Second Temple period, the Sanhedrian members were called "elders," a high priest was a "chief priest," and the successors of Ezra the scribe - who became teachers of the law in those days - were called the "scribes." John 18 relate that Jesus was tried by the two chief priests at the time, Annas and Caiaphas.

Jesus also predicted that the Son of Man would be crucified by the Romans/Gentiles. The Hebrew word gentile means non-Jewish people. Judaism does not allow crucifixion as a means of punishment, but Ancient Roman law did allow certain persons, such as slaves and pirates, to be crucified.

See also
 Chronology of Jesus
 Jesus predicts his betrayal
 Life of Jesus in the New Testament

Notes

References
Books

Gospel episodes
Crucifixion of Jesus
Death predictions