You can keep track of the user app version in firebase, when you want to send a notification, you send it only to the users with the version that you desire. The way to implement this differs depending on the way that you are structuring your data, but the basic idea would be the same. Query the database to find the users with specific version and then send the notification to.
Another approach is to create a custom topic for every version and send the notification through it. This way the app subscribes to the topic which matches its version.
This first approach allows you to have a customized notification per user with the option to customize it further depending on the version they have. The second approach will allow you to send a custom notification per version without the need of keeping tack of the version they are in. However you will lose the ability to target a specific user with a custom notification based on their version and if you wanted to create multiple topics, then you will have to create all the topics for every version of the app, rather than a single topic for every version.