The sport is bringing in more money and more profitable than it ever has been. Attendance is down, but that is an issue that affects all sports. As
@TUSKtimes said they've made the experience of staying at home and watching on TV too good. The regional TV deals MLB teams have with the networks is a cash generation machine.
Baseball lacks what marketing people would call "buzz." It doesn't lead or drive sports talk discussions. Its star players are not widely known outside the sport and aren't pop culture icons. It isn't very popular on social media. Those are areas for improvement, but I think to say the sport is "dying" is hyperbolic.
Also, I think your viewpoint on the popularity of baseball is different depending on where you live. In the northeast, St Louis, Chicago, etc., the baseball teams that play there are followed with enthusiasm. The Red Sox, Yankees, Cardinals, Cubs, etc.,
do create buzz in those areas. In places like Florida, Texas, or other areas where another sport dominates (i.e., football), it is easier to think that the sport is in bad shape because it doesn't create buzz there. I live in Tennessee and it is tempting to think sometimes that nobody really watches the NBA because it isn't popular here, but clearly people do.