Miraidon and Koraidon can only be used in battle after completing "The Way Home." Afterwards, make sure your not riding your Pokemon and have an open party slot. Open your main menu and move over to Miraidon and click A. You should get a prompt to change it to its Battle Form, confirming will have Miraidon move into your party.
Do be Cautious. Using Miradon to ride while it is in your party will remove him from your party, meaning you have to repeat this process.
Hope I Helped.