Solutions of Group 1 and Group 2 metals in Ammonia
As per P. Bahadur's Objective Chemistry 1st Year Program for IIT-JEE and All Other Engineering Entrance Examinations, under the chapter "s-Block Elements - The Alkaline Earth Metals", under Solubility in Liquid Ammonia, it reads:


  Like Alkali Metals, alkaline earth metals also dissolve in liquid ammonia and form coloured solutions. When such a solution is evaporated, hexa-ammoniate, $\ce{M(NH3)6}$ is formed, which slowly decomposes to amides.
  $$\ce{M(NH3)6 -&gt; M(NH2)2 + 4NH3 +H2}$$


(I noticed that it is almost exactly the same as JD Lee's Concise Inorganic Chemistry text.)

So far, it doesn't specify whether this metal $\ce{M}$ is only Beryllium or is the representation of the other alkaline earth metals as well... Since this is the case, I can safely assume that this applies to all the alkaline earth metals, and not just beryllium.

Another point mentioned in the book by Bahadur, under the chapter "s-Block Elements - The Alkali Metals", under Complex Ion Formation is that the Group 1 metals, i.e., the alkali earth metals have a larger size, low nuclear charge and hence don't tend to form complexes too easily. On the other hand, the Alkaline Earth metals are smaller, have higher nuclear charge, and hence, have a greater tendency to accept electrons, forming complexes. In Bahadur's Book, under "s-Block Elements - The Alkaline Earth Metals", under Formation of Complexes, he writes that:


  However, $\ce{Be^{2+}}$ on account of smaller size forms many complexes such as $\ce{BeF3-}$, $\ce{BeF4^{2-}}$ and $\ce{Be(H2O)4^{2+}}$. Of the others, only $\ce{Mg}$ and $\ce{Ca}$ show much tendency to form complexes in solution and these are usually with oxygen donor ligands.


$\ce{NH3}$ is a ligand, and hence acts as a powerful complexing agent. This is why the $\ce{NH3}$ coordinates with these metals, forming hexa-ammoniates.

Source:


Bahadur, P.; Objective Chemistry 1st Year Programme for IIT-JEE &amp; All Other Engineering Entrance Examinations; GRB Books; 2016
Lee, J.D.; Concise Inorganic Chemistry; Wiley-Blackwell; Dec. 1998