Small Battery able to withstand 400°F [204°C]?
Lithium Thionyl Chloride cells (3.67 Volt primary chemistry battery) in conventional AA form factor are available in retail packaging for low delivery rate applications (20-30 mA typical). Your preferred industrial supply vendor should be able to supply these as per regulations in your geography. These are sealed stainless steel and glass packages, designed for oil industry (downhole) sensors, among other things. Typical temperature ratings are 50 oC to 200 oC.

A somewhat lower cost substitute from Steatite in the UK is the Electrochem 4320, with the constraint that at temperatures lower than about 100 oC the battery capacity is very low, so as to be practically unusable at 10 mA load. If the temperature is guaranteed to be between 100 and 200 oC, this should work for you. 

[Edit: I notice that the datasheet for these batteries rates them for operation from 70 oC, so it is possible that my recollection of minimum operating temperature is incorrect.]

Other options to consider include metal-junction thermoelectric power harvesting, if the power demand is very low. This would however require a cold junction somewhere close by, so it may not be a solution for your particular application.