Hi Mahendra Maturi,
Thank you for reaching Microsoft Community.
I would like to make sure on the device model first. Is this a Surface Laptop 2 or a Surface Book 2?
When it comes to replacement, it will be the whole unit that will be replaced. We do not have an option to just replace or repair the keyboard. Please see: Get service for your out of warranty Surface.
For further assistance, please contact support through this page: Contact Us or through our Global Customer Service phone numbers.