He did not say this on his own, but being high priest that year he was prophesying (eprophēteusen | ἐπροφήτευσεν | aor act ind 3 sg) that Jesus was about to die for the nation,
Reference
John 11:51
Sequence
9