how to connect an electric heater with 2 black wires to the wall?
They don't make cables with black/black/green

Since /2 cables do not come in black/black/green as a color combination, and running neutral to a heater that will never need it is rather pointless anyway, the previous installer ran a regular /2 cable (black/white/green) and used the black and white as the two hots.

So, with the power off, connect one heater black to the black from the wall, the other heater black to the white from the wall, and the greens together and to a box grounding pigtail if the box is metal.  While you're in there, put a wrap of black electrical tape on the white wire from the wall to mark it as a hot and save the next installer the trouble.