Levenshtein and Hamming distances are very concerned with differences at a local level. If you want to look for the topic behind the sentence, it's better to consider all the words in the sentence together.
A simple whole sentence approach would be tf-idf. If you treat each sentence as a document, then count the number of times a term (word) appears in the sentence, and divide by the number of documents that term appears in, you get a number for each distinct term in the sentence. Sentences with similar numbers for the same term are likely to be about the same topic.
You could use a simple approach with that, and then try different lemmatization or other grouping schemes if you need better performance.
A simple comparison for the numbers related to each sentence is cosine similarity.