We investigate the structure of a cholesteric blue phase (BP) liquid crystal cell of finite thickness under an electric field normal to the planar surfaces confining the liquid crystal. We carry out large scale simulations to consider cases in which the thickness of the BP liquid crystal is approximately 40 times the BP lattice constant (typical thickness in experiments), larger than that of previous simulation studies. Our calculations clearly demonstrate that the number of periodic structures along the thickness direction (thickness divided by the lattice constant) is discretized by the presence of confining surfaces. The stability of the so-called BP X structure over the BP I under the electric field, as well as the electrostriction, is confirmed. The metastability of the BP X structure after the cessation of the electric field, demonstrated in a recent experiment [Nat. Mater. 19, 94 (2020)] is also shown. We also perform calculations for the reflection spectra of the BP structures, and clearly observe the shift of the reflection peak due to electrostriction. Our study demonstrates the role of finite thickness on the behavior of a BP cell.