Is the door original to the truck? It looks like you (or someone has changed the margin of the door with some welding. That may have affected the door "flatness." Did you replace floor panels or otherwise work on the cab?
I had similar issues with my driver's door after I replaced the lower cowl piece, rocker, floor and rear cab corner. I think I may have gotten the cab tweaked a bit, but the passenger door fits well. I settled for "good enough on the fit, with decent gaps, but the door not being flush along the whole rear edge, and being a bit to proud along the front lower edge (if does need to be slightly proud at the hinge pillar so it clears the cowl when opening.) I will say that getting good door fit is one of the toughest parts of cab work. It's made even tougher if the doors aren't original to the truck.