How can I compare the grammatical complexity between two texts using their sentences dependency length?
If your goal is only to determine whether the level of complexity is the same between these two sources based on these particular features, yes you can simply compare the distributions with a Student's t-test if the distributions are normal or a Wilcoxon test if they are not.
Spoiler alert: it's very likely that they are different. A statistical significance test doesn't give you much information, it's usually much more useful to try to quantify the level of complexity, but it's also much harder. Based on your previous linked question, you might be interested to read about text complexity/readability, quite a lot of research has been done on this topic (e.g. here, here, or there, among many others). There are also a few general tutorials apparently (e.g. this or that). I also know that there have been a number of readability/complexity metrics proposed in the literature, but I don't have references.
Note that looking at the features from the text is unlikely to be very useful on its own. Probably you will need either some kind of corpus annotated by complexity, or to use a metric which has been proved to correlate with sentence complexity.