General Motors plans to invest $888 million to renovate a plant near Buffalo, New York, to make gasoline-powered engines for trucks and SUVs, shifting away from an earlier plan to make parts for electric vehicles there as the Trump administration seeks to end federal support for EVs.