No, you have to pay tax. If the land is situated at a distance of less than 8 kms, such land is an urban land which is a capital asset and sale of capital asset will attract capital gain provided such land is being used for agricultural purpose for at least 2 years before the date of transfer. You can not save tax on sale of agricultural land by investing in a residential property. Any capital gain from the sale of agricultural land can be exempt only by investing in another agricultural land used for agricultural purpose, within 2 years from the date of transfer of original agricultural land.
Have you filed your Income-tax return yet? Click here to start now.