I am sorry, but there isn't a clear way to describe this, but Ill try my best. I really do not know the cause of the issue, just that it happened several times.
The bug:
Mechanic never finishes connecting a flood gate to a lever. After an hour the task is till under way, and isn't suspended. I can see the mechanic running to the gate, stay there for a while, then run away, only to return several minutes later. Sometimes a different mechanic would go in his place and do the same thing.
The setup:
I made an aqueduct to carry water from a stream to an area I wanted to flood above ground. The aqueduct had two branches. On the south branch I installed an iron floodgate and connected it with no issues. I had an iron floodgate I wanted to put in the north branch, but that would never get connected.
The first error with this was that after a while, after it put the initial gears on the door (carried them to the door, worked on it, and then the gears disappeared) and then a few minutes after the mechanic left, it would cancel the job saying there was no path to the target (or something like that).
I moved the gate to a few different spots and made sure there was access to both sides and this still kept happening. I even switched to a steel gate with the same result. Finally, I created another extension (adding an extra bend to the north path that wasn't really needed) and built an external ramp and platform next to the aqueduct to work on the extended part.
At this point, I placed the steel floodgate on a wall accessible by this platform and once again tried to connect a lever to it. This time it never gave me the 'path' error. However, for the next several hours, the mechanic would run back and fourth between the gate and somewhere else (I presume the lever, I could never keep track of him). Over a full game year, it never got installed, and when you looked at the lever, it had the action to connect to the flood gate with the green A for Active Task.
Over that time I installed several other levers and everything else was done quickly, but that flood gate never got connected. I have no idea what to do. I am just going to build a wall and unbuild a wall as needed to regulate the north flow.