Not sure in yours, but in our gas water heater there is an inline fuse. Sometimes you can see a burn in the fuse, which would cause your heater not to ignite. But I had a situation where the fuse looked good, and yet it was not. So if your heater has a fuse and you can replace it, that is a simple, cheap and easy thing to try without putting yourself at risk. Bugs sometimes build nests in the vent pipe, so another thing to check. Otherwise, I'd follow the previous post and have someone who knows what they are doing work on it.
2008 Airstream 27FB International Ocean Breeze
2014 Ford F250 King Ranch 4X4 w/6.7L Diesel, Hensley Hitch