The transition from the business analyst role to a PM is probably the easiest and the most natural. We share the majority of skills and often work hand in hand to make our businesses successful. However, BA roles, similarly to PM roles, could differ significantly depending on the company. Some BAs I know are more technical, others work closely with Sales to close deals. Your background as a BA would influence the transition to a PM role.
Leverage your strengths
Most BAs are usually extremely knowledgable about the product. That's a superpower right there when they want to switch to a PM role. Additionally, BAs could be highly technical which is useful when dealing with development teams as a PM. In some companies, BA is a client-facing role and so they learn how to interview customers, understand their problems and validate their solutions. All those skills would help them immensely in a PM role. Lastly, business analysts often required to lead their projects so they learn a lot about delivery and could use this knowledge later on as a PM.
What to learn
BAs might have different gaps in knowledge that they need to fill when moving to a PM role. If you're not technical - it will be useful to learn how software gets built and how to speak developers' language. Alternatively, if you're mostly worked with devs - it makes sense to understand better the business side of your company. If you never talked directly with your customers that should be a priority for you to learn. PMs are constantly in contact with their customers, continuously learning about them.
Naturally, BAs tend to focus on a solution for one or a small group of customers. However, when they move to a PM role they would be required to find solutions that work for a large number of customers and for the business. Becoming PMs, BA would need to learn how to discover pervasive customer problems and build products that appeal to a large number of clients.
How to test drive
The easiest way for BAs to have a taste of product management is to work closely with a PM or lead their own project from A to Z. Many BAs are already working hand in hand with PMs so they can experience what's it like on the other side. If you don't do it yet - ask the nearest PM to join their team. You can be either an active contributor or just a spectator but in both ways, you'll learn a lot by being on a product team.
Another way is to lead a project as you would being a PM. Odds are, you already doing it, but it might be a project for a single customer. In this case, try to imagine what you'll need to do to turn the solution you came up with into a product appealing to a large number of clients. You can then discuss this with a PM to see if your thinking aligns.
Business analysts and PMs are quite similar and so the transition from one to another is easier than in case of other roles. The most important difference between the two lays in the nature of BA's work which tends to focus on solutions for a single or a small group of customers. However, it takes only a bit of learning for a BA to gain skills and create valuable, usable, feasible and viable products.