Yes, apple will replace them free of cost if there is a problem. First of all, try resetting the airpods:
1 Factory Reset
- Press and hold the setup button for at least 15 seconds.
- Hold the button until the status light starts flashing amber a few times and then flashes white.
- You AirPods have now been fully reset. You will need to re-pair your AirPods to your devices in order to use them again.
If this doesn't help, then book an appointment with an apple expert and they will help you.
This should be helpful: https://support.apple.com/airpods/repair/service
Please do update me of the outcome. Thanks
Regards