All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger.
With regard to what you mentioned in the question that if a person chooses a name for his child from Chapter Muhammad [Quran 47] the newborn child will be a male, then there is no basis for this in the Sharee’ah (Islamic law). The fact that this happened in your case is a mere coincidence and it does not mean that what you mentioned is correct. Therefore, it is possible to change the name that you mentioned to another name.
On the other hand, Dayyan is a permissible name, and among its meanings are The Judge, Al-Qahhaar (The Subduer with ultimate and perfect power) and The Recompenser (i.e. the One who gives recompense) as stated by the linguists.
However, it is more appropriate to name the child with the names of Prophets and Companions or with names that suggest being a slave to Allaah, like ‘Abdullaah, ‘Abdur-Rahmaan, and so on.
For more benefit, please refer to Fatwa 87596, 88553, 87817, 87262 and 82724.
Allaah Knows best.