This is a very familiar scene and story, but we have to look at the points that John is particularly trying to make.
All of the imagery is dark with evil and disrepute: he carried his own cross, it was the Place of the Skull, he was surrounded by criminals. The crucifixion is written to capture the intense isolation and suffering of Jesus. Relationally, emotionally, physically, and spiritually, the portrait is painted that he is cut off, opposed, denied, mocked, reviled, falsely accused, physically destroyed, reputationally discredited, abandoned, and humiliated. Its death in every literal and metaphorical sense.
I think they crucify him not so much as a criminal, but as a valueless toss-away. Pilate didnt find any guilt, but his position wasnt worth the trade-off: Fine, kill the guy. Who cares? The people were willing to trade him for Barabbas. Kill him. Hes not worth the trouble hes causing. The Jews didnt want an interruption to their power with the people or with their interpretation of Scripture. Its easy to trade a life to preserve the order. Kill him. Our ways are more valuable than one life. Jesus was a piece of human litter, fit to be crumpled up and discarded. Thats what his crucifixion was: the repudiation of refuse.
But John still wants us to know who Jesus was (which is the point of his whole book): Jesus of Nazareth, the king of the Jews. The one who fulfills the Scripture (v. 24, 28, 36, 37). Through the passage we see the continuing theme of light vs. darkness, those who believe (v. 25, 35) vs. those who dont.
Jesus says It is finished. The work he came to doto die for the sins of people and redeem themwas accomplished. While it looks as if Jesus has failed, in reality he has won the victory.