When Didi Gregorius joined the Yankees, everyone else in the regular lineup was at least 30 years old. Players can excel in their 30s, of course, but they rarely get much better, and they tend to cost a lot.

“Everything we’ve been trying to do, for quite some time, has been about getting younger,” Yankees General Manager Brian Cashman said on Monday. Acquiring Gregorius, who was 24 in December 2014, was a start.

Gregorius has 24 home runs and batted cleanup in the Yankees’ 2-1 victory over the Minnesota Twins on Monday. It was Gregorius’s fourth day in a row in the No. 4 spot, and his 32nd time there this season. This hardly makes him the Yankees’ best power hitter — Aaron Judge batted second on Monday and ripped his American League-leading 44th homer — but it is not where the Yankees expected Gregorius to hit.

Cashman needed a shortstop to replace the retired Derek Jeter, and Gregorius was one of several middle infielders with the Arizona Diamondbacks. At least six Yankees scouts had seen Gregorius, who had hit .243 with 13 homers in 191 games across three seasons in the National League. Tim Naehring, now the Yankees’ vice president for baseball operations, made the strongest pitch.