"What I have written, I have written"
Pilate also had a sign lettered and put on the cross. The inscription was: JESUS THE NAZARENE THE KING OF THE JEWS. Many of the Jews read this sign, because the place where Jesus was crucified was near the city, and it was written in Hebrew, Latin, and Greek. So the chief priests of the Jews said to Pilate, “Don’t write, ‘The King of the Jews,’ but that He said, ‘I am the King of the Jews.’ ” Pilate replied, “What I have written, I have written.”
— John 19:19-22, HCSB
Why do all four Gospels contain different versions?You can read "Inscriptions on the Cross", here.
Does this indicate error?
By no means. Both Luke and John tell us that the inscription on the Cross of Jesus was written in three languages, Greek, Latin and Hebrew. It is therefore a reasonable assumption that three of the Gospel writers each chose to quote a different language, and that one writer chose to quote the words common to the other three.