BOSTON — When Kenny Atkinson took over the Nets, he envisioned Jeremy Lin directing the offense and the team winning with defense. For two-thirds of the season, Atkinson got neither. But after being historically bad through the NBA All-Star break, he’s finally getting to see the team he expected.

The Nets (20-60) are trying not to dwell on what could have been if Lin had been healthier or they had started defending earlier. They are just making the best of a strong finish, playing Monday in Boston and closing Wednesday in Chicago.

“That’s the big area of progress,’’ Atkinson said of the improved play at point guard. “The first part of that is taking care of the ball. So the fact that we’re handling the ball better, we’re not giving it away, we’re not giving up those easy transition points.

“Overall, we’re a much better defensive team than offensive team, and the stats will prove that out. I said in the beginning, the first day of training camp, we’re going to have to establish a defensive base first, and hopefully the offense will catch up. Now, the offense hasn’t caught up yet. Hopefully that’s for down the line. It’s a team thing, it’s a collective thing.”

The Nets were a sieve for two-thirds of the season, 27th in the NBA in defensive rating and 24th in field-goal defense through a 9-49 start. But since March 1, they’ve been seventh in both categories, their 11-11 mark is sixth-best in the East.

Part of that improvement is rookie coach Atkinson figuring out his in-flux roster. He scaled back his preferred aggressive defense because his players were too slow.

But as the season progressed, he went conservative and protected the paint with Brook Lopez — who is 22 points from becoming the Nets’ all-time scorer — and the starters, and used a more active, pressing defense with the young, athletic second unit.

The other key? Lin. He has missed 45 games, 43 because of hamstring woes. The Nets are 10-11 with Lin in their current lineup.

“Obviously the injury it’s — what do they call it in school? — a partial grade, where you only come to 20 percent of the classes,’’ Atkinson said. “I know this, I’m anxious and excited to have [Lin] healthy next year.

“It’s been obvious that we’re a better team with him. It’s pretty clear. I’d say the games he played in, it’s about what I expected. But we definitely have an offseason to improve, and next year too. He needs to take another step and improve. We’re looking forward to that.”

And while Lin — averaging 15 points and 4.9 assists since March 1 — rues the games he missed, he knows he has to improve and is convinced he will.

“I just feel like we keep getting better,” Lin said. “Right now I don’t know who’s going to be back. I hope we bring back a lot of guys. I hope we make some moves, too. I don’t know what it’s going to look like, but we’re trending in the right direction. At this point it’s just keep putting one foot in front of the next and hope we get better. I’ll be much better next year, too, just being healthy.

“No minute restrictions, none of that stuff, just playing, trusting my body, trusting everything about it. This year was difficult in terms of getting into a rhythm and being able to play. Just coming back from an injury is difficult at times. It changes the way that you play. Hopefully I’ll have a good offseason — a great offseason — and I’ll come in next year and hit the ground running.”

Lopez said he is not focusing on passing Buck Williams as the team’s all-time scorer.

“It comes up,’’ Lopez said. “It’s been coming up a lot lately. But I do my best to ignore that stuff. I’m concerned with continuing our team’s growth. We’ve been doing so great at getting better pretty much each and every game. It’s been such a sight to see.”