Is this a blessing in disguise?

I am actively looking for a job and a recruiter (male) scouted me to work for a company that I qualified for. I had a phone interview, a 1:1 video interview with the recruiter, a video interview with two supervisors (female), and a final interview with two supervisors (female). It was between myself and one other person (male). Throughout this process, I received great reviews from the references I provided and the recruiter sat in all my video interviews. The recruiter gave me pointers and told me where I did well. After the first interview, he told me that the managers were concerned that I told them I wanted to stay at a company long term in hopes of ranking up to management. They were afraid that I would want a promotion within a year. I wrote a letter to him (as instructed), then passed it on to management clarifying that I understood that it would take longer than a year for a promotion. During the final interview, I did not mention promotions or management at all, I wanted to make sure I was a good personality and culture fit. Long story short, they ended up going with the other candidate. They explained that they liked me but feared that I wouldn’t be happy with the possibility of staying in a company and not having the opportunity for promotion. The other candidate was more chill, laid back, and had the same industry background as I had, working the same position.

This is the first time I have expressed long-term goals to a company and have had a negative response. I am debating on not expressing my goals in the future for fear that no one will hire me. Is it me or was this just a bad culture fit?