In general, when you buy RuneScape Gold, there is almost no risk of getting banned or any other punishment, especially if you avoid purchasing vast amounts at one time. When you do a little research on actual trading on Runescape by searching on Google and the Runescape black market forums, you can't find a single player who would say that he was banned for buying RS gold. This is because the chance is so low that the average buyer can buy Runescape mills for years without even being noticed by Jagex.
However, some things can increase the chances of being banned. When many bots process all the rs gold, they can send a signal to Jagex, and Jagex will track the rs gp to you. That is why it is always essential to buy from reliable sellers. For example, there is one aggregator RSorder that contains a list of trustworthy SRS gold vendors.
Another reason why you may get caught is if you Buy RS3 Gold from someone with an IP address marked with RWT. This also happens with inexperienced and small suppliers, who do not take security too seriously and are not disciplined to make safety the number one priority.