OK - with the door open look at the latch on the edge of the door, and using a screwdriver or similar push the back of the latch in so it locks. Will it then hold this position? Then by pressing the button of pulling the handle it will unlatch.
If this all checks out then the little bar on the door pillar has moved back - as said above push harder and it MIGHT lock, if not, undo the bolts to loosen it and move it out a bit, try not to move it ANY other way except out (towards the road) or you will end up having to tweak it again later.
Tighten it all up and try shutting the door, if it now shuts perfectly sorted, if it now shuts with a shove bring it out some more, if it shuts but seems loose or doesn't hold the door in far enough move it back in a little.