Rzr 800 cranks but won’t start

I have a 2010 Polaris rzr 800 that will crank over but won’t start. It ran and started perfectly fine and then went to start it one day and all it would do is crank. When this first started, it would start in any gear except park, when it was in park it would just crank but not start. Now it doesn’t matter what gear it is in it will crank and crank but won’t start at all. I cannot figure out how to fix it and I haven’t seen any threads about this problem. I have checked all the fuses and I am not getting any spark on either spark plug. Any help and or ideas on how to fix it would be great thanks.