Interactive Traffic light - button doesn't work

So, you did run my test code to check the leds ?

If one led - pin 9 not working, did you try to exchange with a led - pin that work . example : pin 12 led with pin 9 led. re-run the code. If pin 9 is still not working... well in that case, the ATMega328P chip maybe partially damage...