Practice, practice, practice!
Here's one way that I've made use of in the past. Find a bunch of problems that involve the mistake you keep making. Then, when you come across that part of the problem, don't just solve it.
Instead, return to your textbook (not the solution guide to the problem) and look at other similar problems. Follow the process outlined in the book. Repeat until this is overly boring.
At some point, after doing this enough, you will have memorized the correct way of doing the problem. For the next problem, don't look it up in the book, but work from what you remember. Check your work (without looking in the answer book), and then look at the answer. If you messed up, look at the textbook again and try another problem.
Basically, you want to practice doing the right way a whole bunch of times. Whatever helps you to remember to do it correctly for one problem, do it over and over and over again.