Please see Please read: make it easier to help you. In particular, we would need a complete MWE with proper code block formatting on Discourse (you can edit your posts, no need to create new ones).
More specifically, is there a reason you’re trying to use the version of MNIST hosted on Kaggle? MLDatasets.jl (which Flux uses for all of its demos) already has MNIST, and getting the data as an array is as simple as calling https://juliaml.github.io/MLDatasets.jl/stable/datasets/MNIST/#MLDatasets.MNIST.traintensor.