Creating AND gate with transistors
Because you are using BJTs, the LED is likely turning on due to B's base current. In detail: current flows through B's 10k resistor, through the base-emitter junction, and through the LED.

To "fix" this, the easiest way would be to use MOSFETs (how logic gates are typically made); current does not flow into a MOSFET gate (in steadystate).