Jesus that was been baptised is part of the fulfilment of the Scripture. Matthew 3:13-15
St. Matthew 3:13-15 Then cometh Jesus from Galilee to Jordan unto John, to be baptized of him.
But John forbad him, saying, I have need to be baptized of thee, and comest thou to me?
And Jesus answering said unto him, Suffer it to be so now: for thus it becometh us to fulfil all righteousness. Then he suffered him.
Jesus was baptized by John to fulfil all righteousness. Jesus was even glad that he fulfil all assignment given to by the Father. That was why Jesus said on the cross that "It is finished". There are thing which was written concerning the Lord Jesus by Moses and others which not be fulfilled, which Jesus did fulfil.
St. Luke 24:44 And he said unto them, These are the words which I spake unto you, while I was yet with you, that all things must be fulfilled, which were written in the law of Moses, and in the prophets, and in the psalms, concerning me.
Then is a prophecy concerning John and the Lord Jesus Christ in Isaiah 40:3. It was John that prepared the way of Jesus and he was the instrument used by God to baptize our Lord Jesus, not because of Jesus sin but to fulfil all righteousness. The baptism of John was for repentance for the remission of sin. John know who Jesus was. He knows that Jesus is the lamb of God that takes away the sin of the whole but he baptized Jesus to fulfill all righteousness.