There are several issues that could be the cause, so I'll just list them all.
- You should use a water conditioner, even on well water, get one that will detoxify heavy metals, it will say so on the bottle. Well water can also contain Ammonia, Nitrite, and/or Nitrates all of which are toxic to fish. You can take a sample of your tap water to a pet store to have it tested for free on those three substances. If you have any of the three, you'll need a conditioner that will detoxify it along with the heavy metals.
- Betta's are tropical fish and as such require a heater, they should be kept at a minimum of 74 degrees F, but 78-79 is ideal. Unless your house is 74+ degrees year round, a heater is required. Outside of their comfort zone will stress the fish and lower their lifespan.
- 2 gallons is extremely small, even for a Betta. 5g is a better minimum. In a 2g you will have to do at a minimum 100% change weekly even if it looks clean, you can't see ammonia which is what fish produce as a waste. A 2 gallon is too small to maintain a cycle (beneficial bacteria that break down ammonia into a less harmful substance, Nitrate). Ammonia poisoning can lead to symptoms you are describing, and will decrease the lifespan of the Betta.
- And finally, the lifespan of a Betta on average is 3-5 years and they are typically 6 months to 1 year old when bought in a store. So this, combined with the above, may also mean he's just at the end of his time :-(