The "baseball is dying" narrative is one of the most annoying discussions there is, both because it's been ongoing for literally 100 years, and because everyone who says it's dying bases their argument almost entirely on anecdotes about their friends and twitter feed.
The reality is that, while baseball has major issues to address in terms of maintaining its audience (as does literally every entertainment option today), it is neither dying, nor even less popular than the NBA, despite the latter being presumed in this thread.
Look at the actual data.
World Series vs. NBA Finals
The NBA Finals has been consistently beating the World Series in TV ratings - there is no question about that. But these numbers are frequently very close, highly variable depending on matchups, and not overly conclusive of anything.
2019
MLB: 8.1M avg
NBA: 8.8
2018
MLB: 8.3
NBA: 10
2017:
MLB: 10.7
NBA: 11.3
2016
MLB: 12.9
NBA: 11.4
2015
MLB: 8.6
NBA: 11.6
2014
MLB: 8.2
NBA: 9.3
2013
MLB: 8.9
NBA: 10.5
2012
MLB: 7.6
NBA: 10.1
2011
MLB: 10
NBA: 10.2
2010
MLB: 8.4
NBA: 10.6
2009
MLB: 11.7
NBA: 8.4
Favorite Sports League
But according to the ESPN/SSRS poll, which is considered the industry standard, MLB is still consistently America's second-favorite sports league, with the NBA coming in fourth (college football slots in between them). But like the World Series vs. Finals ratings, the gap here isn't huge.
2016 (the most recent I could find)
MLB: 10.6%
NBA: 8.2
MLB: 10.3
NBA: 7.8
Local TV Ratings
Now here's the one the NBA really needs to look at if it's serious about moving to the summer. Baseball absolutely destroys the NBA head-to-head in the local markets, and it's not even close. (Data is from 2018-19 NBA season, and 2019 MLB season.)
Atlanta
Braves - 3.62
Hawks - .59
Boston
Red Sox - 5.25
Celtics - 2.67
Chicago
White Sox - .95
Cubs - 4.11
Bulls - 1.36
Cleveland
Indians - 6.55
Cavs - 3.32
Dallas
Rangers - 1.17
Mavericks - 1.29
Denver
Rockies - 3.05
Nuggets - 1.4
Detroit
Tigers - 2.4
Pistons - 1.42
Houston
Astros - 4.87
Rockets - 2.31
Los Angeles
Angels - 1.24
Dodgers - 1.76
Clippers - .56
Lakers - 2.33
Miami
Marlins - .83
Heat - 2.32
Minneapolis
Twins - 6.33
Wolves - 2.2
Milwaukee
Brewers - 6.37
Bucks - 3.07
New York
Yankees - 3.02
Mets - 2.27
Nets - .46
Knicks - .90
Philadelphia
Phillies - 4.06
Sixers - 2.8
Phoenix
Diamondbacks - 2.18
Suns - .79
San Francisco
A's - .76
Giants - 2.34
Warriors - 7.5
Washington DC
Nationals - 2.29
Wizards - 1.19
The thrust of these numbers seems to be that, on a national level, the NBA may be slightly more popular than baseball. But on a local level, baseball absolutely crushes the NBA. People like their MLB teams significantly more than their NBA teams. The NBA moving to the summer would be a huge mistake born of hubris.