To change any color in a defined region we need to make a selection of the area of interest first. This can be done automatically with a selection tool that works best for the source but you will always get best results on a manual selection.
After a slight feathering of the selection we can adjust the colors within the selection freely. For changing a black (which in fact was grey) source to white with preserving shadows I adjusted the color curve to light up both, dark and bright areas.
The example above suffers from its tiny orginal size, from compression artifacts, and from my sloppiness on making the selection. Better result can be obtained by using a high-resolution uncompressed original.