I looked at Gill's take on these 4 sections, and they dont even look comparative, but there's a problem here and I'd personally get the forum's thoughts on this event.

In Jn 1:31-33, John didnt even know he was about to baptize the Christ, in any event he knew afterwards because of what he heard from heaven.

In Mk 1:9-11, it appears about the same, Jesus shows up, gets baptized, same Voice, and off he goes.

In Lk. 3:21-22 it appears someone almost forgot to get Jesus baptism in the story as you look at verses 19-20, kind of "oh and Jesus got baptized too"

But its Matthews version that is troubling for a couple reasons, #1 it contradicts John's gospel, unless you say "well John and Jesus knew each other as cousins, but John (who was filled with the Spirit from the womb and leaped for joy when Mary showed up) just didnt know he was the Messiah, but then #2, the problem with that is Matthew is the only one who says that John tried to prevent Jesus from being baptized because he did actually know him and just why he was.
Problem #3 is this statement,
Mt 3:15, (WEB), But Jesus, answering, said to him, "Allow it now, for this is the fitting way for us to fulfill all righteousness." Then he allowed him.

So how can we make Matthews version harmonize with the others, and how can John's baptism be a fitting way to fulfill ALL RIGHTEOUSNESS?