Foreign Service Officer Home Sale

I purchased a home in 2015 and lived in it until 2018 when I moved overseas as a foreign service officer. I lived overseas until 2020 but then was transfered to another location in the US that is 2000 miles from my home. I would like to sell the home in the summer of 2021 but want to make sure that I can avoid paying capital gains on the profit from the home sale.