The door is not closing far enough to engage the latch. Find out what is stopping it. Any number of things could be possible:
1. Latch is not free to move - Hit it with some silicone lube.
2. Door is bent, contacting the frame somewhere and not allowing it to close all the way - Bend the door until it seats evenly on the frame.
3. The damaged frame shown in picture 1 is stopping the door from closing all the way - clean up the damage.
"You cannot reason someone out of a position they have not been reasoned into"
Al, K5TAN and Missy, N4RGO WBCCI 1322
2002 Classic 30 Slideout -S/OS #004
2013 Dodge 2500 Laramie 4x4 Megacab Cummins