There are two possible ways to install the GXquery extension:
Install it from GeneXus by searching GXquery 4.0 extension on the Add-in Manager, then click on the install button, and finally restart the GeneXus IDE to complete the installation:
Manually copy the GXquery 4.0 extension files (corresponding to your GeneXus version) from the GXquery 4.0 installation folder (GeneXus extension) into your GeneXus installation folder.
In case you do not have GXquery installed in your computer you can download the extension files (corresponding to your GeneXus version) from the GeneXus marketplace. Finally install the extension as explained here.