The wire harness from the Z motor will be wound underneath another wire harness. To make sure the other wires are not disturbed when pulling out the connector, snip the Z motor wire harness indicated in red in the photo below and then pull the connector from the PCB.