Swift has builds for Linux: https://www.swift.org/install/linux/
The license is pretty much Apache 2.0