Aaron Judge hadn’t homered since July 20 before Sunday’s series finale against the Red Sox.

“I’m not too concerned about home run numbers,’’ Judge said before the game. “They’ll come. The minute you try to hit them, you get into trouble. It’ll come.”

He was right, as Judge ended his home run drought in the bottom of the first of a 7-4 win over Boston as the Yankees completed the sweep.

He belted a 389-foot shot into the bleachers in right-center off David Price.

“I got one over the plate,’’ Judge said of the pitch. “I’ve been getting a lot of changeups and sliders off the plate. When you get one over the plate, you just can’t miss it.’’

The blast was a long time coming for Judge, who — although home run totals are up all over baseball — has seen his power numbers dip this season.

Judge insisted the strained oblique he suffered this season isn’t a factor, but he acknowledged that his power outage has been frustrating. And he told hitting coach Marcus Thames the same thing.

“I was making changes before we got to Boston, when we were in Minnesota [last week] and I mentioned it to him,’’ Judge said before the game. “I told him I was kind of tired of hitting singles. It’s good getting on base and stuff, but I want to do more.”

The two have been working on some mechanical changes for the past week or so, but the results hadn’t followed.

Judge entered Sunday with just two extra-base hits in his previous 37 at-bats and he hadn’t homered in 64 plate appearances.

“I feel good with the changes, it just takes a couple of days to come into effect,’’ Judge said. “I hope this road trip in Baltimore, we start seeing some results.”

It started sooner than that, although the biggest challenge, Judge said, is taking what he’s working on during batting practice into game situations.

Thames also said the club was aware of Judge’s numbers, which include a reduced fly-ball rate, which goes along with a dip in his slugging percentage. Judge is also pulling the ball less than he has during his career.

But other stats say Judge is doing just fine. His line-drive rate is up and he said he’s not overly worried.

“I’m still making good contact,” Judge said. “I think I lead the league in exit velo, whatever that means.”

Judge indeed has an average exit velocity of 97.8 mph, tops in the majors and the highest of his career.

Still, he went into Sunday with just 11 homers and the lowest home run and extra-base hit rates of his career.