I have looked at many LED flashlights. I did a big study of flashlights.
Most the batteries point toward the LED. I have seen some that must have the batteries facing 'backwards'. The case is at +4.5 volts not 0 volts. Please double check the batteries/LED to see if you have it hooked up correctly.
Some of the LED flashlights do not have a normal switch to turn the light on/off. Many; the switch curs off the power like normal. Some the switch is not in the current flow but off to the side. The switch allows for bright/ dim/ very dim/ off. So I am thinking that maybe the LED is looking for the switch to tell it to turn on.
Some LED flashlight switches are not switches at all. You push the button once for bright, twice for dim, three times for flashing,.....There may be something complicated here that we don't understand. When the LED is out of the case this 'complicated' thing does not work.
These three cases are not common but.......I have 100s of these flashlights in a box in the barn. Most are simple but some are not....