Jesus knew that He would suffer for her sin along with all mankind`s. So, He did not condemn her.

The instruction to avoid sin is still valid because sin produces some form of death.