Here in verse 31 the original text had the indicative repenteth in the if- clause. In his editing for the 1837 edition, Joseph Smith replaced the indicative form with the subjunctive repent, perhaps because the preceding if-clause in verse 30 has the subjunctive be (“and if it so be that …”). Note, however, that the following that- clause in the earlier verse has the indicative: “that he repenteth and is baptized in my name”.
Either repenteth or repent is theoretically possible here in verse 31, so we follow the earliest reading (“but if he repenteth not”). For further discussion of the competition between the subjunctive and indicative forms in if- clauses, see under Mosiah 2:38.
Summary: Restore the original indicative form repenteth in 3 Nephi 18:31: “but if he repenteth not”; in general, the Book of Mormon text allows both subjunctive and indicative verb forms in if- clauses, so in each case we follow the earliest text.