Stonent, and Richard Crowley seem a little confused.
If you are passing 20mA over a 1.2k resistor the drop over the resistor itself is 24v (Ohm's Law), so that's already a contradiction, you can't get 20mA through your Resistor AND LED (and transistor) with a 24v supply and 1k2 resistor and ANY led. LED's have a forward voltage drop, so you don't have 24v over that resistor any more.
The power dissipated in the transistor is of course determined by the voltage drop across the transistor and the current through the transistor, it cares not what the voltage drops above or below it is, only across it.
You of course don't need the led resistor at all, if your transistor can handle the full (24-VfwdLED)*Current power, and you select RBase appropriately.
It sounds like you don't know a lot about transistors (or, anything), so I recommend you to have a bit of a study about Bipolar Junction Transistors, try this video:
http://youtu.be/ZEDdFjvnAAo