Archgun Rivens are the only Riven type in Warframe that you can get via a method that is not random. While most Rivens drops randomly for primary, secondary or melee weapons by finishing Sorties, Archgun Rivens can be gotten as Arbitration rewards.
To gain access to Arbitrations, you need to have completed all available missions on the Star Chart at least once. The only exceptions to this are the Mutalist Alad V and the Jordas Golem nodes. If you wish to check which nodes you still have to complete, you can do so by speaking to the Arbiters of Hexis on any of the Relays.
During the Arbitration missions, Vitus Essence can drop from dead enemies, and this is what you need to get the Archgun Rivens. You will need to get 35 Vitus Essence to be able to purchase an Archgun Riven. The Riven will be a for a random Archgun weapon, which is where the RNG kicks in.
Don’t worry about missing out on the Vitus Essence, as they have a waypoint icon to lead you to them after they drop. They are also affected by Resource boosters, so if you have one it will double each pickup.
There is no guarantee that the Riven will be for an Archgun you have, so you may need to get a new weapon or grind for more Vitus Essence. Arbitrations are quite tough, but you should be strong enough to handle them by the time you have the Star Chart cleared.
If you don’t have access to the Arbitrations yet, but still want to get an Archgun Riven, you can trade them directly with other players, so should be able to pick one up in the Trade chat.