With this parts you can install a 26,5mm LED drop-in (originally for a UltraFire WF-501 / WF-502) in a MagLite D-Cell.
These are available in many variations:
Pay attention to the right voltage, also consider the heat output of the new LED.
Strongly recommend to use high temperature filament, like PETG or ABS.
I test printed in ABS, which was shrinking quite a bit, so you maybe need to size down the parts a bit.
The original bulb holder need to be shortened about 2mm, also bend the little metal tap outwards, so it will make contact with the spring of the new drop-in. Screw a 5-8mm M3 in the bulb-insert and insert it instead of the original bulb.
See photos for more details.