I guess so. Send it to Nintendo if your warranty is still covered.
If not, just repair it at any shop, or:
Try this.
Get a really thin needle and poke it in the headphone slot, try checking if anything is stuck in there and remove it. If not well, ya repair it.