The "Andi Mack" actor will play Batson who will transform into an adult superhero by uttering the magic word "Shazam!", reported Variety.
Actor Zachary Levi was earlier cast as the lead in the film, to be directed David F Sandberg.
"Shazam!" is an acronym of the ancient world gods and historical figures Solomon, Hercules, Atlas, Zeus, Achilles and Mercury, from which the big Batson derives his heroic attributes when in adult form.
Actor Mark Strong is in talks to portray the role Doctor Sivana, the longtime arch-nemesis of Shazam! while actor Grace Fulton is on board to play one of Batson's friends.