Both particles negate, but their time reference and grammatical effect differ.
Word / formMeaning / explanation
لَمْ يَبِعْhe did not sell: jussive, with a contracted weak vowel.
لَنْ يَبِيعَhe will not sell: subjunctive, with the long vowel retained.
لَمْ يُبَعْit was not sold.
لَنْ يُبَاعَit will not be sold.
Merely switching the particle without changing the verb often creates an incorrect form. The five inflectional nūn forms lose that nūn; the feminine-plural marker stays.