the best way is to use a program similar to either GIMP or Photoshop. Create a new layer, and set it to colour. That'll preserve the shading while changing it to the colour you want
Alternatively you could also do it in MS paint with the eraser tool. Where your colours you use are at the top of the screen, there should be two bigger boxes that are your current selected colours. This is important because the eraser never erases, it merely replaces the colours with whatever the right hand side box is. When you use the left mouse click it replaces any colour on the canvas with the colour. But, if you hold down the right mouse click, then it only replaces on the canvas the left colour with the right colour as you go over the picture.