First capital gains is applicable on gains only and not sale value. What is your acquisition price of property? You need to index it since the purchasing year with calculator available in IT website. Then from sale price subtract that value. This is your capital gain.
For house property, Long term capital gain is applicable only if you hold the property for more than 3 years. Else it is short term capital gain.
Now for the problem, you need to make a notorised affidavit that is counter signed by the buyer that 2L is a security deposit and returning without interest. Use only digital transaction. If a notice comes, you need to provide this proof along with sale deed. IT won't believe any error story. This is based on seeing some cases. No personal experience.
I am not qualified CA but please consult one for professional advice.
If the registration amount is 22 lacs, then of course you would be taxed for 2 lacs. Whether you can save it, there are certain exemptions available. But at first place, you would be taxed.
If the amount on documents is 20 lacs, then no issue.