"Run in a marathon" means running in an organized race. "Run a marathon" means the same, but can also maybe mean to simply run 26.2 miles on your own. Either way, the latter should be accepted, but my question is if any such distinction is made in Polish, with the inclusion of the preposition, or if you always have to use it.
I don't think it's very likely for someone to run 42,195 km outside of any organized event, but if so, I'd say "Nigdy nie przebiegłem maratonu" - treating 'maraton' as a distance, with no difference between 10, 20 or 42,195 km. 'Przebiec' implies 'running succesfully, running the whole distance' - which I haven't managed to do - probably didn't even try.
Ah, the perfective verbs. If there is one concept in this course that still baffles me, it's this. So by switching to "przebiegłem", you're saying that you've never completed the distance, rather than saying you've never participated in the event (which you could do, but stop short of the finish line). I guess that was the distinction I was trying to make. But how does "w" factor in? Is this just like other sports that you grać w [a sport]?
Yeah, "przebiegłem" implies that I managed to do it - so in our sentence, that will be that I never finished a marathon. "Biegłem" doesn't give us any information about my success - maybe I've won this marathon, or maybe I was taken to hospital after the 15th kilometer? But at least I took part in this organized event.
Therefore I guess that if you really ran this distance by yourself and not in any event, I'd say "Przebiegłem maraton" treating 'marathon' just as if it was a distance in kilometres - which is ambiguous, but at least allows the interpretation of 'no event'. Just like you'd say "Wczoraj przebiegłem trzy kilometry" about simple everyday training.
As for sports, I cannot even imagine not using 'w', it wouldn't make any grammatical sentence no matter which case you'd try to use. Not with playing - you play 'w coś'. In this particular sentence however, 'w' means, in my opinion, "in the event".
But with training, you do actually 'trenować coś' - trenować bieganie, trenować piłkę nożną, etc. - without a preposition.