The coil can simply be unscrewed from the valve body and replaced with the new 9 volt DC latching coil. Both coils look vaguely similar but there are distinct differences; the latching coil has a silver wrap with writing on it. Also the two wires are coloured red & black.
The standard 24 volt AC coil in comparison does not have the silver wrap & distinctive writing on it and the two wires are both red.
If you inadvertently install the wrong coil on any system, it simply won’t operate, but nothing will be damaged.