Do you know that is possible to buy commercial license on Geoserver? I know that is under GPL 2.0 license and any changes have to be distributed also under this license. I would like to use Geoserver for commercial project.
No, there is no possibility to purchase a licence and the project steering committee have no plans to dual licence GeoServer as there would be no benefit to us to do so.
Why do you need a commercial licence? If you want support and maintenance there are several companies around the world that can provide that service. If you just need to extend GeoServer please consider making an open contribution so that it is integrated into the code base for future releases.