If you were served by the sheriff, then the landlord filed a summons and complaint for a judgment of possession, which is a legal order that it's okay to remove you from the premises, but which you are calling an "eviction" (legally the "eviction" is when the sheriff physically removes you from the premises. It's the judgment that the credit reporting agencies care about and report -- not the eviction).
So, what probably happened, is you moved, and the landlord requested a "default" from the court, and since you didn't show up to defend, the court ordered the default judgment and the credit agencies picked it up from the court record by computer.
So, now you have the bad mark. And, by law, the only way to get rid of a judgment is by having it set aside (meaning to void the judgment). This requires proof either that you didn't have notice of the court action against you (which you did, because the sheriff served you), or, that due to mistake or misrepresenation by the other party, you were unable to have a fair trial of your case.
This means that you must get the landlord to agree that there was a mistake, because if you have to prove it in court, it will cost you a fortune and you may not succeed. Set asides are VERY tough to get. But, if the landlord agrees, then you can submit a joint motion to set aside to the court, and the judge will probably just set it aside, rather than inquire as to why, because if both the defendant and plaintiff agree that the judgment should be set aside, then why should the judge care?
Complicated, yes, but that's my take on the "sitcheachen!"