I've heard this many times. Don't let it discourage you if you truly love playing dolls. Dollplay is not simply a thing that little girls do. It incorporates creativity, innovation, psychology, crafting and sewing skills, knowledge of relationships between characters, cleanliness, stories, conflict and resolution and even acting.
There are so many good things that can come out of playing dolls. They completely outweigh anything negative, especially if you are happy when you play. There's a brilliant C.S. Lewis quote that I use all the time for this: "When I became a man I put away childish things, including the fear of childishness and the desire to be very grown up."
What he means is that the people who would tell you to put away your dolls are probably insecure and think that "grown up" means not doing anything they think might make them look "childish." While it is natural for the type of dollplay that you enjoy to change as you get older, and you should not substitute your dollplay for participating in things in real life, a really happy, mature grown-up is likely to love the things of their childhood and appreciate them on new ways and on new levels.
Keep playing dolls! And encourage others to play, too.