There is likely a fault with at least one of three items: It's a process of elimination to figure out where the problem lies, or at least where it doesn't lie. Since your AC adapter is recognized and works on another Dell laptop, then the problem is likely your charging jack or charging circuit. The jack is a relatively inexpensive item that is not difficult to replace for someone experienced in working on laptops. If  new jack doesn't solve the problem, then the fault is likely with the charging circuit on the motherboard, which would normally require replacement of the motherboard. Also, it's worth trying a reset:
My XPS 15 9500 is only 18 months old, but suddenly it won't charge. Here are the symptoms I observed and tests I tried: Now the battery is dead, and the computer will not turn on. I took it to a local repair shop, where they told me the logic board had failed. The cost to replace it is $1000, and they don't recommend doing so because it's not worth the money. This computer is less than 2 years old and has suffered no physical damage! I don't want to spend $1000 to repair it, but I also don't want to spend $2000 to replace it. Any other ideas on what might be wrong with it?
XPS 15 9500 won't charge - NOT a battery issue