This paper formally extends the amoebot model of programmable matter to three-dimensional (3D) space using the face-centered cubic lattice. We then give a deterministic distributed algorithm for 2D/3D leader election that elects a leader from among $n$ amoebots in $\mathcal{O}(n)$ rounds in the sequential setting. Finally, we show that our algorithm can be extended to the asynchronous setting, a first for amoebot leader election algorithms.