Intelligence, wit, courage, wealth — all are good in some circumstances and bad in others. Courage in a villain only makes him more dangerous. Even happiness can be corrupted if it belongs to someone who does not deserve it. Only the will to act from duty is unconditionally good.
The crucial distinction is between acting in conformity with duty and acting from duty. A shopkeeper who gives correct change because it is good for business acts in conformity with duty but not from it. Moral worth requires acting because duty demands it — not because of any further benefit.
This sharp distinction between motivation and outcome places Kant in direct opposition to consequentialists. For utilitarians, it is the outcome that matters; for Kant, it is the will behind the act.