The word in the Greek is “two-souled”:
James 1:7 (NAB) - For that person must not suppose that he will receive anything from the Lord, 1:8 - since he is a man of two minds, unstable in all his ways. [“two minds” literally δίψυχος - dipsuchos “two-souled”]
James 4:8 (NAB) - Draw near to God, and he will draw near to you. Cleanse your hands, you sinners, and purify your hearts, you of two minds.
verse 4:8 makes it clear - many are of “two souls” in the sense that they are moved in their souls according to two different, opposing masters - What Jesus tells us we cannot do - a man cannot serve God and Mammon. This means it is either God the Father in heaven, or the god of this world who is against God, satan the evil one.
Thus it is one or the other - choose God: “Draw near to Him” - and repent of your love for sin and your own selfishness: “Cleanse your hands, you sinners, and purify your hearts”.
Many men think that can find a compromise - they can do as they please, and yet not offend God too much. This is two-mindedness - “of two souls”. Each soul has room for only one on the Throne, and it is made for God alone.