Both are correct.
Second is "go to party which takes place in dormitory".
First is like "go to party, to the dormitory". Both "на вечеринку" and "в общежитие" are related to verb "go".