Answer:
Wealth or mammon in itself is not sinful. It is amoral. It is neither good nor bad in itself. It can used for good and it can be used for bad purposes.
In this verse, the Lord Jesus described wealth (or mammon) as unrighteous in connection with true riches. You see, the mammon of this world has a characteristic way of distracting man from acquiring true riches. In this sense, it is unrighteous.
It is not unrighteous as far as its morality is concerned. It is only called unrighteous when considered on its effect on man, generally speaking.