All depends on priorities. The The TownPlace Suites listed above by PSU1980 looks like $189/night for York week if you take Wed thru Fri nights. When I removed Wed, it didn't show up at all. (I just used the Marriott site - didn't try other travel sites in my brief experiment.) Compared to the Days Inn listed above, that's $136-138 higher for each night. Even with gas at 20 mpg for my car and my time to drive maybe 1/2 hour each way, it's worth the savings (to me) to be farther away.
When Joe mentioned his hotel 2 miles away, you stated you wanted to be closer(?). There are a comparably small # of hotels within 2 miles of the fairgrounds, and they definitely will cost you (if even available about 5 weeks out).
For me personally, I'd agree Gettysburg and Lancaster are way too far and too much traffic to deal with each day. I83 from Route 30 up to the outskirts of Harrisburg is not too terrible, even on Friday morning when we are close to rush hour coming down to York. While 30 is busy for rush hour, it's not terribly far from I83 to Carlisle Ave.
It also depends on what you consider acceptable for accommodations. If you are looking for true Hotel accommodations (spas, nice pool, all that type of stuff), that will be a pricier hotel as well. If you are just looking for a clean safe place to lay your head down at night, a cheaper (and possibly farther away) motel may fit the bill. (such as the Days Inn rtraincollector mentions, which I just reserved with AAA discount for ~ $51 per night for Wed-Fri. It's not a palace, but it's acceptable enough to me that I've stayed there exclusively since I started doing this 19 years ago).
Another variable I can think of is your plans for what you will do for meals. If you are going to go out with friends for dinner, you may not end up right near your hotel anyway, so you will probably have at least some drive after dinner. If you are going light on your own, then the close proximity of diners, or fast food can be a benefit.
I guess the most important variable is what you are comfortable with for driving. If you are concerned for safety of driving at night after dinner, or worried you will be too tired after a day of York, then by all means it's worth the money to try to stay closer to be safer in that regard.
Everyone has different limits. When I mention to some people that I live only 2 hours away just outside of Philly, some have asked me if I drive back and forth each day! For me, that would be crazy and not worth any minuscule savings I might see (if any), especially with the relatively lower cost hotel I use. To some people I guess that would be something to consider.
-Dave