A former mosque leader who took advantage of his "influence and power" to repeatedly molest a young girl has been locked up.