Official Explanation from Kaplan This sentence has a modification problem. As written, it states that the final battle of the War of 1812 formally lasted from June of 1812 until the signing of the Treaty of Ghent in 1814. In fact, it must be the war itself that lasted that long, since the final battle was fought in 1815. Eliminate (A).
A vertical scan shows that only (B) fixes this modification problem by moving the War of 1812 so that it directly follows the comma. Although (C) may seem to make the same move, notice that it has "the War of 1812's," a possessive, which actually acts as an adjective rather than a noun. Technically, the preceding phrase still modifies "the final battle."
Neither (D) nor (E) corrects the modification problem. Notice that although (E) may seem like the simplest, most concise choice, since it makes Andrew Jackson the subject and the verb simply "fought," it cannot be correct because of the initial modifying phrase. When this is read back into the sentence, the sentence says that Jackson lasted from 1812 to 1814. The general lived longer than that. Always remember to read the answer choice back into the entire sentence to make sure it works.
TAKEAWAY: Make sure that an introductory modifying phrase actually modifies what it's intended to modify. When you cannot change the phrase because it is not underlined, you need to select an answer choice that begins with a noun that the phrase logically describes.