Why does my blue LED keep burning out?
Any ideas?

Yes. You are feeding the LED with an AC supply. That means that every second half-cycle it will be reverse biased. Most LEDs can withstand about 5 V in reverse. You're applying 24 V AC which will have a peak voltage of \$ 24\sqrt 2 \ \text V \$  so I'm surprised you got any length of time out of it.
You have at least four options:



simulate this circuit &ndash; Schematic created using CircuitLab

Add a diode in series.1
Add a bridge rectifier.
Add a diode in reverse parallel with the LED.1
Add another LED in reverse parallel with the LED.2


1 LED will be half brightness for a given resistor value as only positive half-waves will light the LED.

2 Each LED will be half brightness for a given resistor value as only positive half-waves will light one LED and negatives the other.



Technical note
Strictly speaking, the first diagram relies on most of the reverse voltage being dropped across D2 while D1 remains at &lt; 5 V. What happens in practice will depend on the reverse leakage current of both devices and the one with the lower leakage current will experience the highest reverse voltage. This would require a dig through the datasheets for both devices.