The complaints came as an analysis of Defense Department data showed that states that voted for Senator John Kerry of Massachusetts , the Democratic presidential nominee , in the 2004 election stood to lose 24,289 military and civilian jobs , while states that Mr. Bush carried would gain nearly 12,000 jobs .