If Jesus had only been an ordinary man like everyone else who ever lived, then you'd be right -- He, too would have been a sinner. No matter who we are, we all -- without exception -- commit sin and break God's law. As the Bible says, "There is no one who is righteous, not even one" (Romans 3:10).
But Jesus wasn't only a man. The Bible tells us that He was also divine -- that is, He was God in human form. In other words, Jesus was different from every other person who ever lived or ever will live, because He was both fully God and fully man. The eternal God came down from Heaven and became a man -- and that man was Jesus. The Bible says, "He is the image of the invisible God. . . . For God was pleased to have all his fullness dwell in him" (Colossians 1:15,19).
There is only one thing that God cannot do, and that is commit sin -- and because Jesus was God, He could not sin. He could be tempted -- but He could not sin. Even His enemies admitted they could find no fault in Him (see John 8:46).
Why is this important? It's important for one reason: Only someone who was without sin could save us from our sins. And that is what happened when Jesus died on the cross: All our sins were transferred to Him, and He took upon Himself the judgment we deserve. Don't carry your burden of sin and guilt any longer, but open your heart to Jesus Christ and trust Him alone for your salvation.