If you have a moral objection to receiving those funds, then just give them to a charity that might actually help.
The way economics works, if you choose to divest yourself in this way, you are betting against the profitable use of fossil fuels, but you are not influencing it (it will either continue or cease on its own depending on whether it stays profitable). You are simply encouraging someone else (who maybe doesn't care so much about the environment) to "take that bet" and profit off your poor decision.
It seems strange to me to cast everyone with an index fund as morally corrupt.
In order to profit from them you have to have some form of investment in them, which means in a small way you have contributed to the cause of promoting fossil fuel usage.
Exactly how morally corrupt people with an index fund are is a question I'll leave for philosophers.