A D battery cell is only 1.5V if it is alkaline and new and is about only 1.25V if it is a rechargeable Ni-Cad or Ni-MH cell. It is nowhere near the 3.7V of a Lithium rechargeble cell so your circuit doesn't work.
Lithium rechargeable cells are made in many different sizes that have different capacities. I got some 3.7V/2200mAh cells from a laptop battery that had a couple of bad cells, two more from a TV converter box and some more from a portable DVD player.
The charger circuit in your modem will also charge a larger Lithium battery cell but it will take longer.