You can probably target a station, but it is unlikely to have an effect given typical drivers and passengers
Is an infernal war machine an object?
Heat Metal may be cast on:
a manufactured metal object, such as a metal weapon or a suit of heavy or medium metal armor, that you can see within range.
The infernal war machines are manufactured and metal, so the only question is whether or not they are objects.
As it turns out, 'What is an object' is not an easy question in 5e rules. What is not an object is pretty clear - the machine is not a creature, or a spell effect, or a dungeon hazard, so it is definitely 'object-class'. But is it an object, just one object for the purpose of the spell, or is it a collection of many objects?
The DMG says:
For the purpose of these rules, an object is a discrete, inanimate item like a window, door, sword, book, table, chair, or stone, not a building or a vehicle that is composed of many other objects.
The meaning of the second part of this passage in the DMG is: buildings and vehicles, when they are composed of many other objects, are thus not objects themselves. That is, a building or a vehicle might be an object or it might not; they are objects when they are simple enough, but not objects when they are composed of many other objects.
For example, a cart is a vehicle, and it is also listed in the DMG as a "large object", and it is composed of what were once many separate objects. It is composed of many objects (wheels, tongue, side rails, etc.), but not so many that it is not an object itself.
On the other hand, the ship rules in Appendix A of Ghosts of Saltmarsh, tell us that:
A ship is composed of different components, each of which comprises multiple objects:
Hull. A ship’s hull is its basic frame, on which the other components are mounted.
Control. A control component is used to steer a ship.
Movement. A movement component is the element of the ship that enables it to move, such as a set of sails or oars, and has a specific speed.
Weapon. A ship capable of being used in combat has one or more weapon components, each of which is operated separately.
These components are both "used" by the crew (through the Use an Object action) and have their own AC and hit points should something attempt to damage them. Even the smallest and simplest watercraft listed as an example, the rowboat, has two different multi-item components: the Hull and the Oars.
So are Infernal war machines more like carts or ships? They do have 'action stations' which resemble the components of a ship. The smallest war machine (the Devil's Ride) has just a Helm, while the largest (the Demon Grinder) has a Helm, a Chomper, a Wrecking Ball, and two Harpoon Flingers. In addition to these action stations, each infernal war machine has an engine and a furnace, which themselves appear to be 'components composed of multiple objects'.
However, unlike ships, a war machine has a single AC and hp total, meaning that its action stations and other components cannot be individually targeted by damaging effects.
Further consider that within the specific context of heat metal, one of the examples given in the spell description of 'a manufactured metal object' is a 'suit of heavy metal armor'. While typically sized for a humanoid, this could be as small as the plate mail of your Fairy PC or as large as your Elephant's plate barding. In terms of complexity, real world plate armors consisted of at least twenty individual pieces which were each put on separately, which is why it takes so long to don and doff the armor. We also know that some of these pieces, such as the gauntlets and helmet, are explicitly considered objects in their own right by the rules. Thus it is clear that the heat metal spell is designed to interact with an item that is both large and composed of many parts, while still treating it as a single object.
Within this context, I would say that the entire war machine should count as one object, for the purposes of effects that cause damage; thus the whole war machine itself could be targeted by, for example, a chain lightning spell. On the other hand, spells and other effects that can affect objects without causing damage would more appropriately be targeted at the specific components of the war machine. Thus when casting heat metal on a war machine, a caster should have to specifically choose a particular weapon station, or the helm, engine, or furnace.
What happens to the passengers?
Heat metal says (emphasis mine):
If a creature is holding or wearing the object and takes the damage from it, the creature must succeed on a Constitution saving throw or drop the object if it can.
Note that most of the passengers of a war machine, being devils, would not take damage from a heat metal spell, since most devils have immunity to fire damage. Thus they could maintain their seats comfortably even while their station of the war machine (which is itself immune to fire damage) heated up.
However, there are some passengers that might be affected - such as
the hobgoblins in the band of Bitter Breath
the PC's themselves, or perhaps a rival party of NPC adventurers.
In this case, the vulnerable passenger would find themselves on a superheated and damaging metal surface - but on the turn of the caster. In this case, "spells do only what they say they do" meets "the DM describes the results of your actions". Certainly if the passenger was at a weapons action station they would "drop" these controls, preventing them from using the weapon. Likewise, if they were "clinging to the outside of the vehicle" (BG:DiA 216), I think it would be appropriate for a failed Con save to then provoke a Dex save to remain on the vehicle, such as is described by the Mounting and Dismounting rules:
If an effect moves your mount against its will while you’re on it, you must succeed on a DC 10 Dexterity saving throw or fall off the mount, landing prone in a space within 5 feet of it.
However, if you were seated at an action station whereby you didn't need your hands to 'stay on' the machine, simply taking damage would not (in my opinion) be enough to force you to leap off the vehicle - especially if it was moving!
Can the pilot continue to pilot?
Similar to the discussion above of passengers, most pilots would be immune to fire damage and not be inconvenienced if the heat metal was cast on the Helm of the vehicle. For the rare vulnerable pilot, a failed Con save would certainly mean that they "dropped" the controls.
The heat metal spell says:
If it doesn't drop the object, it has disadvantage on attack rolls and ability checks until the start of your next turn.
I would interpret this as the pilot being at disadvantage to perform "stunts", canceling out the advantage from a "juke", and granting advantage on the save to a target of "crushing wheels" or "raking scythes".