Jesus says that his soul is troubled and he prays to his Father, accepting his coming suffering, and receiving the Father’s comforting response.  Then he tells the crowd,

Now is the judgment of this Cosmos.  Now will the Ruler (Archon) of this Cosmos be cast down [or:  driven out].  And, when I am lifted up from the earth, I will draw all men to me.  (John 12.31-32)

John explains that Jesus is referring to his crucifixion, but the crowd takes him to mean some sort of ascension and departure.  Jesus admits that he will depart, by resorting to light imagery:  “The Light is among you only a little while longer.  Walk while you have the Light, or the Darkness will envelop you” (John 12.35).  This verb, “envelop,” is the same used in the Prologue:  “the Darkness did not envelop it” (John 1.5).  When speaking of “this World” (ho Kosmos toutos), Jesus indicates that because the World has been judged (and found faulty? guilty? defective? finished?), the Ruler will lose his power.  And the Ruler’s being cast down or out is contrasted or connected with Jesus’s elevation in death.