I have this recipe https://www.whittakers.co.nz/en_NZ/recipes/soft-centred-chocolate-pudding/ which uses 50g ground almonds for the chocolate pudding. Would it be safe if I could replace that with 50g of flour instead if I don't have ground almonds? Would it affect the consistency of the pudding in any way?
The recipe looks a like a gluten free chocolate lava cake. If that is the intended consistency you're looking for then yes by all means that substitution WILL work! Maybe play around with the amount of flour as well.
The main worry is the texture; if you want a gooey pudding you'd get in a pudding cup or mousse (unlike their photo) you may end up with more of a cake-like outcome if you do it with flour. Finely ground almonds/almond flour doesn't bond the same and is less gummy because of it. I would try to do something like coconut flour or something if possible.
The flavour will also obviously be affected from lack of the nutty slightly maraschino cherry-esque taste the almond would have added. If you wanted to work around that I personally would add a smallest dash of amaretto or have had used another nut flour or something like hazelnut to go in another direction.