A retired general was plucked from obscurity to serve as the commander in chief’s next senior military adviser.