You will not be banned for receiving hacked money. As per the Rockstar Games Customer Support article (updated 2017-11-30), Update on GTA Online Cheaters and Modded GTA$ (emphasis mine):
Question: I heard GTA Online cheaters were causing large amounts of modded GTA$ to transfer to innocent players over the past few weeks. Is Rockstar Games aware of this, and what is being done?
Answer: We have received complaints over the past few weeks about cheaters gifting large amounts of GTA$ to others, setting bounty rewards outside game limits, or otherwise attempting to tamper with the GTA Online economy. We have deployed several hotfixes to prevent this type of activity, and will be adding further cheat protection in future Title Updates as well. Players who willingly cheated to create this illegitimate influx of in-game currency will be separated out from the rest of the population. If you were the unwilling recipient of an impossibly large amount of GTA$, you do not need to worry about disciplinary action against your account. However, please be aware that we will be making community-wide automatic adjustments to players’ account balances to remove the modded money.
Question: I was minding my own business and suddenly received a huge amount of money in GTA Online from a cheater. Am I in trouble?
Answer: To keep the gameplay environment as fair as possible for legitimate players, we routinely do sweeps to separate out cheaters and modders, and to reverse any illegitimate transactions. These sweeps are based on in-game automated detection, examination of suspicious gameplay statistics, and also manually-reviewed evidence submitted by the Community. If you were not engaged in any willful cheating or exploiting yourself, you do not need to worry about getting caught up in our work to separate out cheaters from the rest of the population.
Question: Do I need to report to Rockstar Games the fact that I was given a huge amount of modded money I didn’t want?
Answer: No, you do not need to report this. We are able to tell the difference, automatically through gameplay data, between the cheaters and the players who received this money innocently. Players who were willingly cheating are notified about any action taken against their account. If you were not cheating, you do not need to do anything further.