A task-scheduling problem as a matroid (CLRS book)
I believe you are completely correct but mixed up two things from the book, namely the order in which the tasks are selected and the order in which the tasks are scheduled.
The greedy algorithm here indeed orders the task by their weights $w_i$ (as for every max-weight greedy algorithm on matroids). Given a set $A$ of tasks that are independent, i.e. they can somehow be scheduled so that no task is late, one way to schedule those tasks, such that none of them is late is by ordering those tasks (and only those, you omit the the tasks that are not in $A$) in increasing order of their due dates $d_j$.
Regarding your example with 99/100 tasks early: The one with the biggest weight (or penalty) is definitely one of the 99 tasks, as it is the first one to be selected by the greedy algorithm (unless its due date is non-positive). However, this task does not need to be the one that appears in the schedule first.
In essence, the order in which the greedy algorithm selects the tasks is not related to the order in which the tasks are scheduled.
Towards your second question: Whether a task is early only depends on its due date. The corresponding independence check for the matroid would work as follows:

The empty set is independent (no task is late).
Given set $A$ and task $a \notin A$, order all tasks in $A+a = [a_1, \ldots, a_m]$ by $d_j$ (such that $d_1 \leq \ldots \leq d_m$) and check for all $a_j \in A+a$ whether $j \leq d_j$ (as you have unit processing times).

The reason why this works, is subject of Lemma 16.12 (in the 3rd edition at least. the equivalence of three statements).