which is the opposite of inexpensive. :D
none of those options sounds incredible good with a limited budget. You'd need EVERYTHING from the 4.0 Jeep including the interior wiring, dash, fuel pump and plumbing, driveshafts, exhaust, hood, hood latches and the radiator support. It's best to buy a complete running donor. For a 350 you need all new mounts, plumbing, radiator, driveshafts, etc. all custom and/or really expensive. Not to mention that your axles are suddenly the weak link.
The 3.4L bolts right in using your existing exhaust and accessories. you just need to balance the flywheel and add in an aftermarket inline fuel pump. add to it an aftermarket carb and you should get a decent Jeep out of the deal.
What isn't working right with the 2.8L? Maybe it'd be best to just fix the thing for now.