As said, just pull off connector on existing one, then unscrew it, screw new one in put connector on.
If you have the new one to hand you can simply put your finger over the hole to stop the water flow, won't be a lot anyway if cap is on expansion tank, then screw new one in.
tabetha