The adjective that could replace "cocky" in a way that gives the sentence a positive connotation is confident.
"Smug," "conceited," and "arrogant" all have negative connotations, while "confident" suggests a sense of assurance and self-belief without the negative implications.