If holding down the trackpad button while the computer is starting up didn't work, then depending on your model g4 their should be a tiny emergency eject hole to the right of the optical drive, use a paperclip while the computer is on or starting up to push that tiny button and the disc should eject.
Sorry if you have already tried these options, I wasn't sure.
you can also try the following Linx distro installed on a USB flash drive, al thou I am not sure that will work either. (booting from USB)....
You can boot from USB on a mac using the command line/ openfirmware prompt. Command+Option+o+f
This would require some command line stuff tying to find the USB device and it's name and then booting from the USB drive once you find it.
powerpc version:
http://cdimage.ubuntu.com/ports/releases/10.04/release/