How can you sell great people?

You can no longer sell units for gold. The commenter on that question is misinformed.

See "Balance Changes" section: https://civilization.com/news/entries/civilization-vi-fall-2016-update-now-live

Deleting a unit no longer provides gold.