I soldered on a DC jack onto the end and shrink wrapped it all.
To assemble, push the circuit board in, using the heat sink to hold the board in place (the heat sink presses against the sides of the housing).
Push the cap onto the end of the housing.
Then thread the inner ring, plug the lamp into the socket (or solder it in).
Then thread on the last ring.
If you don't think you'll open it again, you might want to put a drop of threadlock or superglue, to keep it from unscrewing. Ducttape the cap, and hotglue/epoxy the hole where the battery wires emerge.