I think you are mixing up Swift and SwiftUI.
Swift is a programming language created by Apple, it's been cross-platform for a while but is now going to be officially supported on Windows. Swift is Apache licensed.
SwiftUI is a UI framework created by Apple for the Swift language, it's only available on Apple platforms, and it's proprietary.