Make an LED (20 LEDs) circuit battery efficient
The capacity of this battery is not 1000mAh, it is about 750mAh at low currents.

Note that the linked battery only provides 9V for a short period of time. The rated capacity assumes that your device still works if the voltage drops to 5.4V. You will actually get about 700mAh and the voltage will be 7V to 8V. If the LEDs are not in series and you need 400mA you should expect no more than 1.75 hours of operation.

It will be difficult to use 2 LEDs in series if the voltage drops close to 7V, and the brightness will change greatly as the battery discharges. Even if that was OK, you will get about 3.5 hours of operation in this case.

You should be looking for another approach, possibly one that uses a high-efficiency switching regulator as a constant current source.