Does lightning tend to favor certain locations over others? For example, is it more likely to strike a tree than the ground?
Here is a similar question on the preference of local position of lightning. But it's worth pointing out that lightning only happens in biomes that have rain and don't have snow. So desert, ice desert, nether (no rain), taiga, and tundra (snow) don't have lightning. (Theory from code reading)
No, lightning strikes random locations during thunderstorms. However, if you are trying to get something struct by lightning (If you are trying to get charged creepers), use a trident enchanted with channeling. They where added in 1.13, and channeling tridents will strike mobs with lightning when hit. However, they only work in open areas and during thunderstorms, and the target has to be a mob.