Could you try to import MNIST using torchvision?
import torchvision.transforms as transforms
import torchvision.datasets as datasets

train_dataset = datasets.MNIST(
    root='./', download=True, train=True, transform=transforms.ToTensor())