The schematic on the motor diagram confirms that the connections for the windings are interspersed as I supposed.
Looking back at your original photo, Black and Green should be one winding, and Red and Blue the other. If you can put the wires into order as Black-Green-Red-Blue on the connector to the stepper driver you should be in business. If the motor runs backwards from the desired direction, just flip the plug around and it should then run the right way.