In a tweet, President Trump congratulated Mr. Jones on his victory and called write-in votes “ a very big factor” in the outcome.