This is an old problem with an old hack to fix it, but it has cropped up again since Bluehost has decided to set cURL to use IP6 but the world is not ready for it.
Symptom and fix are in this thread:
https://moodle.org/mod/forum/discuss.php?d=225811 but basically, the symptom is this in the Available language packs area:
(Failed to connect to 2400:cb00:2048:1::6814:ef: Network is unreachable)
and this fix is add this to your lib/filelib.php file in the right place where curl is set (around line 1250 in M 3.1).
$options['CURLOPT_IPRESOLVE'] = CURL_IPRESOLVE_V4;
Also, see https://stackoverflow.com/questions/11529202/libcurl-force-ipv4-or-ipv6 and https://unix.stackexchange.com/questions/90742/curl-with-ipv6-not-working-by-default
Also, don't use Bluehost, whose support is so horrible that even GoDaddy is starting to look good next to them.