Yes, you are right, both Colombo and Sri Jayawardenepura Kotte are capitals of Sri Lanka. Sri Jayawardenepura Kotte is accepted as an answer on this quiz for Sri Lanka, it's just that you spelled it wrong.
I did some research over both of Sri Lanka's capitals. According to Britannica.com, Colombo is the executive and judicial capital of Sri Lanka, and Sri Jayawardenepura Kotte is a suburb of Colombo and the legislative capital.