It is lawful to adopt a child. The holy Prophet Muhammad (صلى الله عليه وسلم) adopted Zaid ibn Harsah (رضى الله عنه) which is enough proof for it being lawful. However, the ruling of real son shall not be applicable merely by adopting.
Allah (Subhana Wa Ta’ala) knows Best
Darul Uloom Deoband