If Jesus was "without blemish," how did He not sin?
You are right that Jesus did not sin. The apostle Peter wrote that God took our sins away “with the precious blood of Christ, as of a lamb without blemish and without spot” (1 Peter 1:19). But could He have sinned if He wanted to? Sure. In fact, the writer of Hebrews said that Jesus was “in all points tempted as we are, yet without sin” (Hebrews 4:15). If Jesus could not sin, then it would not be true to say that he was tempted just like us.
When we are tempted, we face a choice between doing what is right, and doing what is wrong. When we choose to do wrong, we sin. So the simple answer to your question is that Jesus did not sin because He chose not to sin.
This could not have been easy. After all, we know that it’s hard to resist temptation. But Jesus was wise in God’s ways, even as a young little boy (Luke 2:52). Jesus knew God’s Word perfectly. This means He knew what God wanted Him to do, and He obeyed His Father in all things (Luke 22:42, Hebrews 5:8-9). When Satan tempted Him, Jesus knew exactly what to do (Luke 4:1-12). He could have sinned, but He didn’t. That is why He became the perfect example of how we should live our lives (1 John 1:3-6).