I had that recently. I changed out the lock mechanism and still had the same problem. Turned out to be a broken wire in the loom from the door to the body.
If it happens to be the lock actuator, it's one piece with lock mechanism. Not separate, at least on my car it was.