Must be:
.png
513x513
Greyscale MODE (must actually be selected, not just drawn in all grey colors. you can test this by trying to draw on the heightmap with a color. if it shows up, it is not in greyscale mode. if it comes out as some shade of grey, it is.)
One layer throughout the entire time of making it