Jesus who was without sin, got baptized to identify with all sinners that He came to save. He was tempted just as we are. Jesus is the lamb of God who came to take away our sin (John 1:29). Jesus is the way, the truth and the life (John 14:6). Without Jesus we cannot be right with God.
Matthew 3:13-17 Then Jesus came from Galilee to the Jordan to John, to be baptized by him. (14) John would have prevented him, saying, “I need to be baptized by you, and do you come to me?” (15) But Jesus answered him, “Let it be so now, for thus it is fitting for us