Note: building the SDK is tricky but building the engine is pretty straight forward if you already have git, jdk, etc. installed:
git clone https://github.com/jMonkeyEngine/jmonkeyengine.git
cd jmonkeyengine.git
gradlew install
…or if you are not using gradle/maven for your builds and need the actual jars, I think “gradlew dist” still works.