If the vehicles distributor is not spinning then yes that could cause no spark.
However most times it's not the distributor itself causing no spark but instead it could be a bad distributor cap or rotor or even a crack distributor cap that is causing no spark.
Another thing that could be causing no spark is the Ignition Control Module that sends electricity to the distributor and ignition coil.
Check those ignition control module that is sometimes under the distributor cap but could be located somewhere else depending on make and model of vehicle.
If it's not the ignition control module then it could be the ignition coil or ignition coils causing no spark.