Although you can import previous versions of Guitar Pro projects (such as .gp4) to the latest version of the program, you cannot produce any of the previously used formats because the latest Guitar Pro projects (.gpx) are not backwards compatible.
This means that a direct gpx to gp4 conversion is likely not possible.
Unfortunately, there is no detailed software record in the database that match this conversion.
GPX
Files with gpx file extension can mainly be found as projects created in Guitar Pro version 6 and higher tablature software.
GP4
A gp4 file extension is associated with Guitar Pro 4, a multi track editor of guitar and bass tablature, which allows you to create whole scores for guitar, bass or other stringed instruments in a few minutes.