A nonprofit has reaped $5 million from the sale of its 20,000-square-foot office building in downtown Morristown.