Your examples include two different contexts.
"I have never travelled by road" uses an idiomatic way of stating your mode of travel. You can say you travelled by air, by road, by sea, or, by plane by car, by boat.
"I have never travelled on road B" is referring to your use of a particular road. "On" means atop of, which you can say about roads or the sea because your vehicle is in contact with the surface. Obviously, you can't say that you travelled "on air".
You could use them both in the same sentence:
I always travel by car, but I have never driven on road B.
You can use "by" to refer to a specific road, but only if you refer to it as a method of travel, for example:
You can get to the shops by road A, but I always go by road B.