32 This took place to fulfill what Jesus had said about the kind of death he was going to die.

Read John 18:32 Using Other Translations

That the saying of Jesus might be fulfilled, which he spake, signifying what death he should die.
This was to fulfill the word that Jesus had spoken to show by what kind of death he was going to die.
(This fulfilled Jesus’ prediction about the way he would die. )