4 Jesus, knowing all that was going to happen to him, went out and asked them, “Who is it you want?”

Read John 18:4 Using Other Translations

Jesus therefore, knowing all things that should come upon him, went forth, and said unto them,Whom seek ye?
Then Jesus, knowing all that would happen to him, came forward and said to them, "Whom do you seek?"
Jesus fully realized all that was going to happen to him, so he stepped forward to meet them. “Who are you looking for?” he asked.