You could approach this as follows:
match = None # best match word so far
dist = None # best match distance so far
for word in NWORDS: #iterate over all words in ref
i = jf.levenshtein_distance(candidate, word) #compute distance for each word with user input
if dist is None or i < dist: # or <= if lowest freq. first in NWORDS
match, dist = word, i
return match #function returns word from ref list with lowest dist and highest frequency of occurrence