Just quote the parameter.
mypassword='password&123'java -jar client.jar -p username "$mypassword" file.gz
The quotes are only there to keep the shell from performing any further processing of the value of mypassword
after the parameter is expanded. You don't actually pass quotes to your program.