In addition to the battery itself, the problem could also be the USB port it is being connected to, or the docking cable being faulty.
Other than the battery not charging, when it is connected to the computer, does it operate normally? Does it sync? Does it Restore (if you tried that)? Does it work as a "disk" (mini external drive), if you Enable disk use?