Google the package: for example GATK (You may need to create an account with the Broad institute) to find the download link. A common scenario is the JAR file will be stored in a zip or tar.gz collection of files. After downloading you can invoke the JAR file with a compatible version of Java loaded as a module.
wget https://github.com/broadinstitute/gatk/releases/download/4.6.1.0/gatk-4.6.1.0.zip
unzip gatk-4.6.1.0.zip
mkdir ~/.local/gatk
mv gatk-4.6.1.0 ~/.local/gatk/4.6.1.0
Invoke using full path:
module load Java/17
java -jar ~/.local/gatk/4.6.1.0/gatk-package-4.6.1.0-local.jar -h