The typical process would be something along the lines of
1) Go to a salvage yard and compare a long bed frame and box to a short bed frame & box paying attention to the differences in lenghts of the mounts, the fuel filler tube mounting differences and best place to cut and add in new metal. That will give you an idea what will be involved. I've personally seen long wheel base trucks which were shortened. I've participated in sectioning in replacement front frame sections before ..years ago in my street rod days.
2) Remove your truck's box so you can see and measure things. And Acquire an 8' box. If you found one that matched your truck's color, that would be a bonus.
3) Cut the frame (Z-notch is often used) after the front box mount, and add in the appropriate length of new frame. (Presumably cut from another dodge ram). Re-weld making sure everything is lined up properly. I'm not going to get into frame strength. I'm sure others will quickly point that out.
4) There's a chance you might have to cut the center box mounts off the frame and re-weld in the appropriate location.
5) Extend the brake & fuel lines, exhaust and take the drive shaft to a driveshaft shop to get lengthened the amount needed (and balanced).
6) You may need to replace the rear spring with heavier springs if you plan to haul heavier loads.
7) Get the box painted if needed
I'm not advocating the OP or anyone do this...but conceptually, those would be the approximate steps.