You need to have node installed already. Once it's installed you'll have npm because it's bundled with node.
I googled quickly for gradlew.bat and from the first link I opened it looks like it depends on java being installed already.
Node already includes npm because it's the official package manager. Java doesn't include gradle, presumably because they have multiple options and none of them is considered the official one?