The good news is that if you use Google Assistant for getting directions, you’ll be pleased to learn that Google has recently rolled out a new settings option for Assistant that will help make it easier. With these settings, users can choose a default method of commute, such as driving, taking public transport, walking, or by bike.
Based on this, Assistant will default to using that method of commute when giving you directions. There are also two different settings, where one can be used for work, and the other for other directions. For example if you typically take public transport to work/school but drive on the weekends, you can differentiate those and Assistant will swap between depending on the directions you ask for.
This feature appears to have been enabled server-side, meaning that no action will be required from the user, so fire up the Assistant settings if this is something you want to set for future trips.