Not an uncommon problem.
Look at the angled steel section below the door....it is cut down where the door closes and is subject to cracking at one or both corners. I had a similar problem with mine.
The solution was to get a couple wood shims to insert one at the corner, on the side so it lifted the ends of the angled steel. What I did was to use the jacks to raise one rear corner and insert a shim from the side. I then let the jack down to see if that closed the gap any. I next went to the other end and did the same thing.
By alternating raising and pushing the shim in further and then letting the camper down, I closed the gap and the door latch would catch much better.
An added bonus here is you have removed the yaw in the lower section of the camper which will then make it easier for the slides at the rear to go up and down when you raise/lower the top.
Effectively killing two birds with one stone...or in this instance two problems with two shims.
I do not expect them to last more than one season so I keep a couple stashed in the camper for when I do notice that there is a discernable yaw developing again. Once you determine how far you need to insert them under the rear panel ends, you can trim the excess with a box-cutter or sheetrock cutter.