I suggest make sure your wiring is well connected, and try different wires than the ones you were using before. It sounds strange to me that burning bootloader works but uploading a sketch via programmer does not work. In both cases, the avrdude is doing is uploading a program from a hex file. Show us a good clear photo of how you have it wired.
Also make sure you have not modified your boards.txt file or other config files to do something like change the lock_bits or change other fuses or avrdude recipes. Use a fresh installation of the IDE if you have been modifying it. That is one of the only possible scenarios I can think of that would lead to uploading bootloader fine but not able to upload a sketch. Try a different computer if possible. And of course try another USB cable, because you never know when you have something flakey until it drives you crazy for a while.
If you want to upload a sketch via a programmer to a Mega 2560, you will need to set the high fuse to D9. But that only affects whether your sketch runs or not runs, it would not impact your ability for avrdude to upload or to read the chip signature.
Of course, it is possible your Mega board has some damage and that would be supported by the fact you are having difficulty uploading to it.
You may want to disable auto reset on your Uno after you upload the ArduinoISP sketch. That is usually done by connecting capacitor between GND and RESET on the UNO. 1uF or higher should work fine. It is not always necessary, but since you're having problems it is something to try.
You may also want to attempt using your Uno as ISP to re-burn the USB-to-serial software on your ATmega16U2 USB-to-serial chip, if your Mega board has the ATmega16U2. You may be able to restore your board to normal operation.
This other recent thread has a lot of good info you may be able to use:
If you have more questions or continue to have problems, set the IDE preferences to show verbose output on upload, and post the full text of what it shows you after each thing that you attempt, and tell us all of the various settings you are making on the Tools menu for Board, Processor, Port, Programmer, etc. for that attempt. And tell us what version of the IDE you are using, and write down and tell every single step you are doing, including wiring, what buttons or menu selections you are clicking in the IDE, etc. The more orderly and easy to understand details about your step by step methods, the better.