No. You cannot put Dialga in a gym. As of right now, you cannot put legendaries in gyms. But since there are more legendaries being added every year - and some non-legendaries are dominating - they may allow us to add legendaries to gyms soon.