Not native speaker. For questions like this DeepL may come in handy: https://www.deepl.com/fr/translator
Si je pouvais étudier dans n'importe quelle université. (Attention after si comes either présent/passé composé (present perfect), imparfait (imperfect) or plus-que-parfait (pluperfect) in conditional phrases.) See: https://www.lawlessfrench.com/grammar/si-clauses-conditionals/
The question of when to use either 'à', 'dans' or another French preposition for conveying the English prepositions 'at', 'in', 'on' and the like is very complicated to be treated here. As far as I know there is no one-to-one correspondence. Depending on the context 'in', 'on' and 'at' may be conveyed by various prépositions (à, dans, en,...) and phrases.
In general, one may use 'dans' in order to convey the idea of "enclosed by" as in
Dans un compartiment, dans une boîte, dans un fauteuil...
or in structures with a definite article as in
Dans le bateau, dans l'histoire, sortir dans la rue
or when the noun is qualified as in
dans une grande prison, dans n'importe quelle université
See, e.g.:
[1] « Dans mon collège » ou « à mon collège »?
[2] https://www.clozemaster.com/blog/french-prepositions/
[3] https://www.lepointdufle.net/p/prepositions.htm