If the battery is not charging, this is not a SW issue (this is apparent as charging happens even when the system is shut down). I'm not sure how you know the power adapter and battery are OK, but if this is the case, all that remains is the charging circuitry inside the laptop. May be repairable but probably means a new motherboard.