You could put a slip of paper between the battery and the contact spring inside the light. New flashlights containing batteries are often shipped that way.
If you want to go fancier, Countycomm.com and Illumn.com both have various kinds of battery holders. Here are some particularly nice ones that are on the expensive side:
https://countycomm.com/products/delrin-aaa-battery-locker-waterproof