Hello, the battery may have been needed, but has no bearing on the check engine light and the cause it's coming on.
You'll need to have hands on troubleshooting utilizing a high quality diagnostic tool that can not only retrieve the diagnostic trouble code(s) stored in the processor that are causing the light to come on, and checking into why they are being set.
www.repairpal.com/repair-shops
RepairPal Certified shops can diagnose and repair your 2014 Buick Regal. They provide transparent pricing with a minimum 12-month or 12,000-mile warranty on repairs and services.