No, you will need to amend your 2017 return to report the IRA contribution in the correct year. You can't add it to your 2018 return. But, you mention both Traditional and Roth IRA - these are two separate types. A ROTH IRA would not qualify you for a deduction but you may qualify for a retirement savings contribution credit. So, its possible you may not need to amend the 2017 return if it was just a ROTH IRA contribution and you were eligible to make it and you aren't eligible for the credit. But, you may want to enter it to check for these items.
https://ttlc.intuit.com/replies/3288565