Before replacing it double check the connector at the back of the headlight. I've had mine loose a good connection (the stock wiring is rather pathetic on mine with bare wire showing for at least 5MM before the actual plastic connector on two of the wires) Just take it off, bend the pins on your headlight out a bit and re-connect it and see if it works. If it doesn't then it is indeed bad. I'm going to rewire mine soon with some high temp replacements and wire it up correctly vs how the guys at the factory did it!
05 Electric Lime Green LJ with a 4spd Auto, 2.5inch Suspension Lift, OME Shocks, OME Steering Stabilizer, 32inch BFG M/T's on 17inch Moab's using Spidertrax Spacers, UCF Aluminum TC Skid, Novak Cable Shifter, Brown Dog MML, Rokmen 1/2 BL, Banks CAI, Diehard Platinum Marine Battery, JW Speaker 8700 LED Head Lights, Safari Nets, G.E.A.R Overhead Console/G.E.A.R Tailgate Storage, Rugged Ridge XHD Front Bumper, Warn Gas Tank Skid, Mopar Rock Crawler Rear Bumper, Warn XD9000i Winch with Warn Wireless Remote, and a Uniden 880 CB Radio