I was having the same problem and I found advice from a flickr site from eight years ago, as I am not as technically proficient as you seem to be and my battery is now charging. So I cannot take credit for this answer, but it was useful for me:
I've had this happen on my D40X a few times with the original battery. When the battery gets very low, the charger may fail to recognize the battery is present.
I don't know why, but this method worked for me multiple times:
Unplug the charger and remove the battery. Wait a few seconds. Plug in the charger without the battery. Wait a few seconds. Slide the battery in and out of the charger a few times and watch for the charge light to come on. If it comes on, leave the battery there for the whole cycle and you're OK again.
They key learning is to not let he battery get completely depleted before recharging. That is, to where the camera will shut itself down.