If this is actually an Apple Thunderbolt Display (27-inch) (model A1407), you need an Apple Thunderbolt 3-to-2 adapter. You might also need a Thunderbolt 1/2 cable if it turns out that the built-in "hydra" cable is bad or flaky (and you want to try bypassing it).
The Thunderbolt Display has two heads on its hydra cable:
- Thunderbolt (Mini DisplayPort connector)
- MagSafe (older version, not compatible with either of your Macs)
The similar LED Cinema Display (27-inch) (model A1316) has three heads on its hydra cable:
- Mini DisplayPort
- USB
- MagSafe (older version, not compatible with either of your Macs)
If that is the display that you have, you need a third-party USB-C to Mini DIsplayPort (female) adapter, and you will need to connect the display to the computer via USB, as well, if you want to be able to control brightness.