Yup.
You cut off the old plug, carefully cut away the outer jacket (~1" or a little less), then carefully cut away the insulation on each wire (~ about half as much as you cut away for the outer jacket), tin each wire (try not to leave any exposed copper), then add the plug casing and insulation, then you solder the wires to the plug. Lastly, you slip on the insulation and screw on the barrel and test the headphone, make sure it works properly. I then like to unscrew the barrel and add epoxy to seal the interior of the plug and finalize the thing. It'll be a PITA to remove the epoxy if you find that you screwed up, so you do that at the very end after testing your work.