I have a feeling it is 1 of 3 things:
If it's just one door:
That particular door's actuator, check to see if it's installed properly, the wires are not crimped.
That particular door's door lock arm (inside door, long thin round metal 'tubes') make sure they are not binding and nothing is blocking them. Make sure they are on the right 'track' motion.
If it's all doors:
Lastly, replace the power door lock control unit.