There is no real difference in meaning between nonprofit and not-for-profit. Both can be used to describe organizations that do not redistribute surplus funds to owners or shareholders. Nonprofit is about twice as common in U.S. publications, but not-for-profit is gaining ground because it more accurately reflects how these organizations work. Most nonprofit/not-for-profit organizations do make profits. It’s just that the profits are reinvested into company operations.
The one-word form tends to give way to the hyphenated non-profit outside North America.