Apple's Xcode is a free download, the Swift compiler is open source. However, to become an "official" developer on the Apple platforms and publish apps you do need a paid developer account.
The compiler isn't commercial, unless you are saying that anything Apple makes is "commercial" because they are a for-profit business.
You only need to pay for it if you distribute your app on the app store.