First, you have to know the voltage of your flashlight.
Although many flashlights that take 18650 also take 2 x CR123 (some are even provided with a sleeve because the C123s are slightly narrower), the torch may not be suitable for the 6 volts of 2 x C123 (I learnt that the hard way, burning out the LED of a torch when I was young and foolish).
18650's are 3.7 volt. CR123 batteries are 3 volt.
Although D cell Maglites make nifty defensive weapons, I believe once you try 18650 you'll never want anything else. They are supposed to have a 10-year charged shelf life. They certainly seldom seem to run down. The illumination from a CREE Q5 or T6 Led (or Chinee knockoff) powered by an 18650 is stupendous.
In the olden days I carried a 2 x AAA Pelican Mitylite everywhere and thought nothing could top it for size/weight/illumination. Now it seems laughable....
I have a couple of old Surefire 6P's tucked away. Once I stopped getting free batteries I just started using AA and AAA powered lights.
I shall grab a pack of those 18650's and let you know how it goes, cheers mate.
PS. The D cells at home are to twat potential intruders as much as they are for providing light.