I would double check that the battery is inserted correctly and is making good contact (once you have it assembled try pressing fairly hard on the plastic above where the battery is).
The key is designed to work to start the car even with no battery--that close proximity allows the car to read the key's code passively.
If you can determine the battery is making good contact (be sure to check for any corrosion) then it's possible the fob has some sort of electrical fault. In that case your best bet is to buy a used Cmax key on ebay. You still have to have a dealer program it, but it's several hundred bucks cheaper than buying the key from them.