K-1 gains excessive Section A net income vs real gain

I received a final K-1 on a multi-family real estate property that i invested 40K in 2018 and received 42k in 2022. My total gain is $2000. Limited partner(passive investor)

I have the final K-1.

Section L:

The begining capital account is -20,431

Current year net income 62,431

Withdrawal and distributions 42000

Ending capital account is 0. 

 

Box2. 7642 (net real estate income)

Box9c: 8461 (uncaptured section 1250 gain)

Box 10: 54789 (net section 1231 gain)

Box 19 A: Distributions 42000

Box 20: has N, Z, AG, AH

 

I have suspended losses carry over of -48,714. I entered sale price as 42k and partnership basis as initial investment of 40K.

When I enter this information in TT and review SECTIONA: line 9

it appears that my net income is column a(7462+2000+54789)=64251 - 4871(col b) = 15537(net income allowed). When i review 1040, looks like I am ending up paying tax on 15537 and not 2000 I received as gain. I did not received any distributions for the property. Should i adjust my basis so 15537 is reduced to 2000?

 

Can somebody please help me resolve this?