In light of extant case law, this is not a Bill of Attainder. Nixon v. Administrator of General Services, 433 US 425 identifies the essential characteristic of such a forbidden bill:
a law that legislatively determines guilt and inflicts punishment upon
an identifiable individual without provision of the protections of a
judicial trial
This case was in response to a bill passed by congress directing the Administrator of
General Services to take custody of Nixon’s presidential papers and tape recordings, specifically identifying Nixon by name. The court rejected an argument that
"an individual or defined group is attainted whenever he or it is compelled to bear burdens which the individual or group dislikes". The crucial question is whether the bill enacts a "punishment". Analogous to the prohibition of using products by Kaspersky Labs (Kaspersky Lab, Inc. v. US Dept. of Homeland Sec., 909 F. 3d 446) where Congress prohibited using those products in certain government computers but it was found that the restriction "is not a punishment but a prophylaxis necessary to protect federal computer systems from Russian cyber-threats", the Montana law is not a punishment, it is prophylaxis necessary to protect the citizens of Montana from a threat (per the Montana legislature). No person is found guilt of a crime by this law – any punishment (the daily fine for violating the law) is determined based on general principles of law not legislative fiat, and is imposed by a court of law after a trial. If you violate this law, you will be tried in court and if found guilty, you will be punished – hence the law is not a bill of attainder.