I also have a 2014 MacBook Air, except mine still has its original battery in, and works perfectly. But this is a great idea as there are no longer macOS updates for these old devices. It is an intel based CPU, so most Linux distros should work perfectly well on it, and then regularly receive OS updates.
Just note, in the linked article, that there was a small workaround needed to establish Wi-Fi connectivity.
See https://www.howtogeek.com/i-installed-ubuntu-on-my-old-macbook-air-and-wish-id-done-it-sooner