It's a bit unclear what the question is, but I think it might be whether the lightning merely chose a path along the Saturn V's plume by chance, or did it facilitate the electric discharge by providing a grounded, more conductive pathway than its surroundings normally would?
If this is the question, then I would have to say the latter to be the cause of the path lightnings took in hitting the ground and causing the main lightning bolt's electrical discharge. I said lightnings (plural), because there were actually two lightnings that discharged through the Saturn V's body during the flight itself, which also traveled towards the ground hitting the crane and the platform of the mobile launcher, so that mission was really unfortunate in this sense.
The launch was made into a threatening gray sky with ominous cumulus
clouds. Pete Conrad's words 43 seconds after liftoff, electrified
everyone in the Control Center: "We had a whole bunch of buses drop
out", followed by "Where are we going?" and "I just lost the
platform." The spacecraft had been struck by lightning. Warning lights
were illuminated, and the spacecraft guidance system lost its attitude
Quote and photograph source: NASA History Program Office
The way lightnings travel through the atmosphere during normal circumstances is a rather complex process of finding best conductive conduit from the negatively charged source towards the positively charged sink. Since the invention of extremely high speed cameras, we've been fortunate enough to study this process that, for the most part, happens roughly in one second in great detail. I suggest checking some videos explaining how the lightning forms in slow motion, for example this YouTube video should serve the purpose well enough.
Lightning is usually oriented cloud to ground, with the cloud having a negative electrical charge, and the ground having a positive one, but in some cases this charge can also be reversed. Before the main discharge can happen though, the lightning will form a conductive conduit from source towards the sink by forming many smaller lightning bolts in seemingly random direction and size towards the sink. They are not exactly random, but that is irrelevant to the question. These smaller arm (or is it a tentacle?) bolts will discharge a smaller part of the total charge of the lightning, but enough to charge the surrounding air and form a plasma conduit. Once this conduit reaches the sink, the full discharge happens that is usually a lot stronger, provided of course, the total charge didn't dissipate in the atmosphere during the forming of the conductive plasma conduit already. This is somewhat liberal simplification of the lightning discharge process, but let's for the time being say that the lightning will try and find the path of least electrical resistance, and we'll apply this later on to our Apollo 12 from the question.
I'll assume for the Apollo 12 lightning events to have been caused by the way more frequent negatively charged storm cloud discharging towards the ground, but as far as the plume conductivity goes, this doesn't even matter and would work both ways. This direction is also indicated by the description of the event in the Wikipedia page on Apollo 12:
Thirty-six-and-a-half seconds after lift-off, the vehicle triggered a
lightning discharge through itself and down to the earth through the
Saturn's ionized plume. Protective circuits on the fuel cells in the
Service Module (SM) falsely detected overloads and took all three fuel
cells offline, along with much of the Command/Service Module (CSM)
instrumentation. A second strike at 52 seconds after launch knocked
out the "8-ball" attitude indicator. The telemetry stream at Mission
Control was garbled. However, the vehicle continued to fly correctly;
the strikes had not affected the Saturn V Instrument Unit.
We have previously established, that the lightning's main discharge bolt will take the path of least electrical resistance during its conduit search, starting from the source and discharging into the sink, that is usually the ground. Now, if we introduced along its path something that is already a pretty good electrical conductor, like for example a metallic rocket's body or also a good and grounded conductor like the mobile launch platform, this would save the lightning a lot of effort into establishing its conduit and simply reuse what's already there and continue from then on towards the sink. But what's this got to do with the rocket's plume? Two things really.
First, both lightning events were within the Saturn V's first stage burn (thanks to @AnthonyX for pointing this out in the comments), for which 5 of the Rocketdyne F-1 engines were used, using Lox/RP-1 propellant formulation (liquid diatomic oxygen or O2 as oxidizer and Rocket Propellant-1, a highly refined kerosene as fuel) with an oxidizer to fuel ratio of 1:2.27.
Any hydrocarbon-based fuel, which is what kerosene is, would produce carbon dioxide (CO2), carbon monoxide (CO), hydrocarbon (HC), and oxides of nitrogen (NOx) in the exhaust plume. While there wouldn't be much water vapor forming due to spare hydrocarbon hydrogen reacting with the oxidizer and atmospheric oxygen into water (H2O) molecules, the weather conditions provided for raised humidity levels and with it environmental water added to the mix. Pure water itself isn't much of an electrical conductor (pure and deionized water has a conductivity of about 5.5 μS/m, microsiemens per meter, which might be up to 10 times less than your average tap water due to additives), the rocket's exhaust gasses would provide additives into the mix of these by now vaporized water molecules within and surrounding the plume, and dramatically improve its electrical conductivity.
But that's not the whole story. This plume is also expelled through the rocket engine's nozzle at supersonic speeds and, of course, extremely hot. Velocity and temperature of the rocket's exhaust gases through the atmosphere are big enough for the exhaust and atmospheric molecules to highly ionize and form a shroud of plasma surrounding the exhaust plume. Plasma is of course exactly that conduit the lightning would form with its arm bolts that we mentioned earlier, explaining how the lightning will try to find the most electrically conductive path from the source towards its sink where it discharges. So this plasma plume is what the lightning's main discharge bolt would reuse as well, on top of the rocket's metallic body.
And that's why the two lightnings that hit Apollo 12 during flight through the lower atmosphere and on a cloudy day found a path through the Saturn V's metallic body, through the rocket's exhaust plume, and eventually hitting the mobile launcher platform's mostly metallic construction sticking high above ground, before discharging into the earth. It was the pathway of the least electrical resistance, and the plume is hot and fast enough at the exhaust to ionize and form water vapor plasma at the edges of the plume that is an excellent electrical conductor in comparison to the surrounding air. Even if it was heavily raining, it would still be not much different than taking a long lightning rod and poking the storm cloud with it. Which is, in a way, what Saturn V on the Apollo 12 mission did.
Good that they had Pete Conrad onboard, he was known to find humor in nearly all circumstances.