Glad to help u out bud, might be the battery, If u have an older version of the 3ds xl, that battery is compatible with the newer version of 3ds xl, if not then this is optional, u can send it to Nintendo for a replacement or u can buy replacement parts from wiigotem at eBay.
Do u still have warranty or 30 day from where u bought it, if not, sorry but u will have to go send it to Nintendo BUT if u want it to be free, be sure everything is how the way it was originally, meaning all screws in their correct place, be sure that the screws are not badly stripped, obviously Nintendo would know u tampered with the system. If you added any tape or other things in the system, take them out. Good luck.