When I back up and then go forward I go about twenty feet ahead -wham. It feels like you getting hit in the rear end and it makes a loud noise. The dealer says if it does not do it all the time they would not be able to find the problem. They said to wait till it got more frequent.
If you can get it to do it then take the desk guy with you and show them .
Since your truck is under warranty let the dealership fix it for you. Don’t try to fix it yourself. My guess is some sort of driveshaft problem. Carrier bearing mis-aligned, or slip joint is sticking. Could be transmission or differential problem too though, among others. Good idea to double check all the wheel lug nuts are on and properly tightened. I have an old Ford truck that sometimes does the same thing and for it, the problem is the driveshaft slip joint sticks. Too high idle rpm contributes also.
Try and figure out when it happens so it can be replicated.
I’d pressure them to at least put it on a lift and do a visual inspection.
This could end up as a lemon law issue, so I think you should bring it in several times before too long instead of just waiting. It would also be worth trying another dealership if possible and then contacting the manufacturer using the process in your owner’s manual.