Built in 1625 as a garrison, Huntington Castle was a strategically important route between Wexford and Dublin .