In theory you should be able to get a battery repair from Apple for up to 10 years, but Apple only implemented this change earlier this year. The exact details are unknown since Apple's information has been very vague and limited. The 2014 model is considered "Vintage" which means that repairs may only be possible from an AASP as long as the necessary parts are still available. From what I've seen and read, only AASPs which perform repairs within their own shop are able to repair "Vintage" computers since many Apple Stores and a lot of AASPs will just mail a laptop to an Apple mail-in repair depot, but the mail-in repair depot AFAIK is unable to repair "Vintage" products. Again, Apple's information on all of this is very vague and confusing. Plus things do work differently in each region. This is what I have pieced together from various Apple documentation and also our organization's own interaction with Apple for some "Vintage" repairs. Unfortunately our organization has had mixed results getting official battery repairs for older laptops which in theory should have support for battery replacements for up to 10 years, but Apple's documentation has some tiny vaguely worded footnote qualifying statements which calls into question whether it is just smoke & mirrors.
Try to get an official Apple battery repair if at all possible if you intend to continue using the laptop for as long as possible. If an official Apple battery repair is not possible, then check out OWC to see whether you feel up to replacing the battery yourself or having an independent Apple repair shop do it for you (it is a lot of work, plus you must safely recycle the battery at a recycling center). Unfortunately the quality of third party Lithium-ion batteries is extremely poor which is why I recommend Apple to replace the battery if at all possible. The next best option is a battery from OWC. I would avoid most other third party batteries since it is nearly impossible to find a trustworthy vendor able to supply good batteries all the time.
FYI, I can no longer find the article which contains the 10 year battery replacement option, although the last time I found the reference it was just a tiny footnote within another article.
Stop using the laptop immediately and disconnect the charger. Power off the laptop as well. If you are comfortable opening the laptop you can even disconnect the battery from the Logic Board. It is important to minimize electrical activity within the battery to help prevent further swelling of the battery which could damage the Trackpad (especially important if going for a third party battery like OWC).