"I got married last year."
I think it would be に but they sometimes mix formal with informal Japanese in these lessons.
In my Japanese class we learn that ni is not needed for relative times like yesterday, last yra, next week, etc. You do need it for specific times like if you use a day name or a time.
結婚 is a noun.
The word here is 結婚する, which is 結婚 verbified. 結婚しました is the past form of 結婚する。