I would pull the head on the side with the bad cylinder and either replace a valve or replace the piston if the cylinder wall isn't gouged. You would need to drop the oil pan if you replace the piston. I would definitely not replace the engine. I would guess the problem is in the head. $4000 is way too much to replace the engine. I would be willing to bet you could have your truck repaired under $2000 if you find an honest mechanic.