"Sie waren für fünf Jahre verheiratet." is correct, implying they were married for five years, but are now divorced.
"Sie sind seit fünf Jahren verheiratet." (present tense!) would mean "They have been married for five years." and are still married, as you said, carrying on into the present.
Hope this helps.