What I find funny is that the OP is mad at the manufacturer for missing that the frame was built incorrectly at the factory, and that the dealer missed the bad frame during the CPO inspection process, but yet he's not mad at himself for missing the bad frame issue when HE inspected the truck before he bought a used pickup, and didn't take it to anyone for a pre-purchase inspection, which may or may not have found the issue before he bought it.
The manufacturer is going to be unwilling to hand over a new pickup to someone who bought a used pickup, simply because if they did that, they still have this used pickup with a bad frame that needs to be replaced. The OP complains that it would be cheaper for Nissan to replace his pickup with a new one, but he doesn't seem to understand that even if they did that for him, they would still need to pay a dealership to replace the frame on that truck after they hand him a brand new truck. So that just isn't going to happen.
It would make YOU happy, but your cost estimate wouldn't make the accountants at Nissan very happy.
And finally, Nissan isn't really renown for their customer satisfaction.
Or build quality.
Nissan is legally required to replace or repair the frame according to the manufacturers warranty.
Which they are doing.
Honestly, I would be aiming my energy at the dealer who CPO certified the pickup with a bad frame, and undo the purchase.
Then I would go buy a pickup from one of the other companies that offers a midsize pickup truck.