Chosen Solution
The imac does not turn on. No power.
Before spending any money on this machine, please open it up (it’s very easy to do, only three screws), examine the logic board capacitors (cans) for swelling and/or corrosion. Then plug it in, using the eraser tip of a pencil press the reset and restart buttons (CUDA switchs) located right by where the SATA hard drive cable plugs into the logic board. Observe the diagnostic LED lights in the center of the logic board. You will probably see number one on and the rest off. If the cans are good, then I would replace the power supply. If bad, you’re wasting your money.
You may have fallen victim to the bad PSU issue these iMacs have… Here’s the part you would need to replace [linked product missing or disabled: IF165-001-1] and the instructions on how to do it iMac G5 17" Model A1058 Power Supply Replacement