The source of calories may matter for other reasons, but if you eat more calories than you need, you will store those excess calories as fat - that is, you will gain weight. That's true for starches, fruit, or anything else.
So the fact that calories in dried fruit are mostly from sugar doesn't matter. What does matter: Dried fruit are high in calories. And because they're so sweet (because they're dehydrated), it's easy to eat a lot of them without feeling full. That's why they're not recommended for people losing weight, and completely forbidden on the max weight-loss diet.
PS - this site has a pretty good search function. Use it whenever you wonder what Dr. McD. has said on a topic. For ex., search "dried fruit" and you will get quite a few results, including this one:
https://www.drmcdougall.com/2019/03/14/ ... nsumption/