Choosing one of the three factions has you destroying the other two, so by siding with either The Railroad, The Institute, or The Brotherhood, and playing out their questlines... you will be forced to destroy the other two and become hostile with the remaining two factions. You will also loose two of the three faction specific companions, those being Danse(Brotherhood), Deacon(Railroad) and X6-88(Institute)
If you've sided with the Railroad and destroyed The Prydwen, after warning Desdemona during Precipice of War and having The Brotherhood attack The Railroad... Danse has become hostile to you since you are now enemies of The Railroad. So he's either at The Boston Airport if you left him there like I did, and he's hostile, or more likely he has completely disappeared since you and The Brotherhood are now enemies. He may have been on the Prydwen if you left him there and been part of the fight.
I played all three outcomes and stuck with The Railroad in the end, but during my Institute ending, Danse was at Boston Airport and was hostile. I had to end his suffering with missiles. There's some backstory to Danse also, but to see that, you need to finish as The Brotherhood. I'm not going to spoil it for ya.
In closing, the only way to keep Danse alive and available as a companion...is to finish the game as The Brotherhood of Steel.
Edit: Suggest you do like I did, that is create a save point before you are forced to choose between the factions, play out the two you aren't going to stick with (for story and achieve purposes) and then go back to the final one and play that out to it's ending.