Hi,
Please note that using different prepositions will give you different meanings.
In the second sentence, “by” is also possible, but the context needs to be changed.
The drivers injured in the 5 car pile-up were flown to a nearby hospital by medical helicopter. This means they were transported to the hospital by a means of a helicopter.