This was to fulfill the word that Jesus had spoken indicating what kind of death (thanatō | θανάτῳ | dat sg masc) he was going to die.
Reference
John 18:32
Sequence
27