By default Magento uses the one page checkout. When using the one page checkout, only the first checkout step is loaded on document ready. The remainder get loaded by AJAX as you proceed through the steps, so the element you're looking for isn't there when you're looking for it.
It looks like the Payment object in opcheckout.js has a handy addAfterInitFunction method you can use to run whatever code you need after the payment step is loaded.