Chances of getting mech in BITs don't seem high, but there's option to branch change, details pertaining to which @Anjali_arora can help you with.
If you are specific about mechanical then prepare for a sub 2k rank and get into an older IITs. Newer IITs are not suggested because you may not enjoy much benefits now but maybe after many years, compared to older IITS and BITs .
You can do masters in astrophysics with any branch in engineering. You can switch careers. In my campus there are guys from ECE, mech passionate about pursuing Physics careers and planning to make the switch.