The closer you are to maxing your base, the less your TH upgrade should cost -- to the point that when ALL upgrades are complete (including walls, heroes, troops and defenses), it's free.