...Since I have been living here for 5 years and have proof of it is it possible to avoid capital gains?
No, because you do not pass the ownership test (two years) that would otherwise qualify you to claim the Section 121 exclusion of up to $250,000 of gain.
You might, somehow, be able to qualify for a partial exclusion (see link below) but that seems doubtful based upon the facts you provided.
As a footnote, did you pay fair market value for the house? It seems a bit odd that you would have a large gain on a house you just purchased a few months ago.