When you execute distributed, slaves should already ready to accept requests, so you need to define it earlier.
Running JMeter recommends setting values in setenv.bat/sh
setting the variable JVM_ARGS will override most pre-defined settings, for example
JVM_ARGS="-Xms1024m -Xmx1024m" jmeter -t test.jmx [etc.]
will override the HEAP settings in the script.
To set those variables permanently, you can place them in a file called setenv.sh in the bin directory. This file will be sourced when running JMeter by calling the jmeter script. An example for bin/setenv.sh could look like:
# Use a bigger heap, but a smaller metaspace, than the default export HEAP="-Xms1G -Xmx1G -XMaxMetaspaceSize=192m"